Why do I need to use ie to open winform? I personally think it is too troublesome to deploy the client using winform, such as Kingdee UFIDA and winfrom. It takes a lot of time to add new features and then deploy them; why can't I open it with IE? In this way, you do not need to deploy the client. File Updates only need to be performed on the server. If you have an idea, you must implement it ..
Advantages: winform is stable, and the front-end control devpress fully satisfies the UI. It does not need to write a lot of WEB front-end beautification code. More importantly, development is time-saving ......
---------------------------------------------------------------- Development Environment: win7 + vs2010
Web server: win2008 built-in web Service Program firewall <table id = 'waiting' style = 'width: 100%; height: 100%; position: absolute; visibility: hidden; background: # ffffff; 'border = '0' cellspaceing = '0' cellpadding = '0'>
<Tr>
<Td valign = 'middle' align = 'center'>
<Table border = '2' cellspacing = '2' height = '50'>
<Tr>
<Td align = 'center' width = '000000' style = 'font-size: 12pt; background: # ffffff; '>
<B> <font color = 'blue'> Loading... </font> </B>
</Td>
</Tr>
</Table>
</Td>
</Tr>
</Table>
<Script language = 'javascript '> waiting. style. visibility = 'visable' </script>
<Html>
<Head>
<Link rel = "shortcut icon" href = "swerp. ico">
<Title> (2) SuHe SYSTEM (2) </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = euc-kr">
<Style type = "text/css">
/*
Body {
Scrollbar-shadow-color: # ffffff;
Scrollbar-highlight-color: # ffffff;
Scrollbar-face-color: # d9d9d9;
Scrollbar-3dlight-color: # d9d9d9;
Scrollbar-darkshadow-color: # d9d9d9;
Scrollbar-track-color: # ffffff;
Scrollbar-arrow-color: # ffffff;
}
*/
Html, body {overflow: hidden ;}
</Style>
<Script language = "text/javascript">
Function window. onload ()
{
Try
{
If (document. all. waiting! = Null)
{
Document. all. waiting. style. visibility = "hidden ";
Document. all. waiting. style. height = "0px ";
}
}
Catch (e)
{
Alert (e. name + "[Load]:" + e. message );
If (document. all. waiting. style. height! = "0px ")
{
Document. all. waiting. style. visibility = "hidden ";
Document. all. waiting. style. height = "0px ";
}
}
}
</Script>
</Head>
<Body leftmargin = "3" topmargin = "3" marginwidth = "3" marginheight = "3" overflow: hidden;>
<Object classid = "MainControlLibrary. dll # MainControlLibrary. MainControlLibrary" height = "100%" width = "100%"/>
</Body>
</Html> ---------------------------------------------------- 1. parse the dll file using the Web Page code (main.htm). Pay attention to the last sentence and remember not to use the syntax format MainControlLibrary. dll # MainControlLibrary. mainControlLibrary ---------------------------------------------------- 2. mainControlLibrary. dll how to generate vs-C #-WindowsFormsControlLibrary3-UserControl1.cs (page content added by yourself) Change WindowsFormsControlLibrary3 to MainControlLibrary UserControl1 to MainControlLibrary
-----------------------------------------------------
3. The web server configuration is not described. Website-Default web site -- add application-alias (webdll) -- physical path (web page and dll file path) -- OK
---------------------------------------------------- 4. Client IE sets the site for receiving trust -- add IP Address -- customize level -- enable Activex all
Win7. net Security Settings cmd run or save batch processing run, pay attention to the administrator privilege
C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ caspol.exe-q-rg "1"
C: \ WINDOWS \ Microsoft. NET \ Framework \ v4.0.30319 \ caspol.exe-q-rg "1"
C: \ WINDOWS \ Microsoft. NET \ Framework64 \ v2.0.50727 \ caspol.exe-q-rg "1"
C: \ WINDOWS \ Microsoft. NET \ Framework64 \ v4.0.30319 \ caspol.exe-q-rg "1"
C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ caspol-pp off-machine-addgroup All_Code-url http: // 192.168.20.20/* FullTrust-n 1
C: \ WINDOWS \ Microsoft. NET \ Framework \ v4.0.30319 \ caspol-pp off-machine-addgroup All_Code-url http: // 192.168.20.20/* FullTrust-n 1
C: \ WINDOWS \ Microsoft. NET \ Framework64 \ v2.0.50727 \ caspol-pp off-machine-addgroup All_Code-url http: // 192.168.20.20/* FullTrust-n 1
C: \ WINDOWS \ Microsoft. NET \ Framework64 \ v4.0.30319 \ caspol-pp off-machine-addgroup All_Code-url http: // 192.168.20.20/* FullTrust-n 1
-------------------------------------------------------- 5. Enter http: // 192.168.20.20/webdll/main.htm in ie
Data can be operated like winform
------- Complete -------------
---------------------------------------------------- Subsequent questions: 1. Data Transmission is also implemented using web servers (SQL connection files are placed on servers) 2. Dynamic addition menu 3. Dynamic addition of dll