Web display Winform,web Open Winform,ie open WinForm

Source: Internet
Author: User
Tags addgroup

Preface: Why use IE to open WinForm personal feel, WinForm deployment client too trouble such as Kingdee · UF, Winfrom patching too much trouble, adding new features to deploy a lot of time, so why not use IE to open it? This does not require the deployment of the client, and the file update only needs to be done at server. If you have an idea, you must realize it.
Advantages. WinForm stable. The foreground control devpress completely satisfies the UI and does not need to write a large number of Web foreground landscaping code. More important development is time-saving.

。。。。


----------------------------------------------------------------development environment: win7+vs2010
webserver:win2008 Bring your own Web service program----------------------------------------------------<table id= ' Waiting ' style= ' width:100%; height:100%;p Osition:absolute; Visibility:hidden; Background: #ffffff; ' border= ' 0 ' cellspaceing= ' 0 ' cellpadding= ' 0 ' >
<tr>
&LT;TD valign= ' Middle ' align= ' center ' >
<table border= ' 2 ' cellspacing= ' 2 ' height= ' >
<tr>
&LT;TD align= ' center ' width= ' 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= ' visible ' </script>
<link rel= "shortcut icon" href= "Swerp.ico" >
<title>⑵⑵suhe system⑵⑵</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>

<body leftmargin= "3" topmargin= "3" marginwidth= "3" marginheight= "3" Overflow:hidden; >
<object classid= "maincontrollibrary.dll#maincontrollibrary.maincontrollibrary" height= "100%" width= "100%"/>
</body>

1. The above is the Web code (main.htm), parsing DLL files, note the last word, remember not syntax formatmaincontrollibrary.dll# Maincontrollibrary.maincontrollibrary----------------------------------------------------2. MainControlLibrary.dll how to generate Vs-c#-windowsformscontrollibrary3-usercontrol1.cs (page content Join yourself)change WindowsFormsControlLibrary3 to MaincontrollibraryUserControl1 Change to Maincontrollibrary


-----------------------------------------------------
3.webserver Settingsconfiguration does not explain. Site-default Web site--Join application-alias (Webdll)--Physical path (Web page and DLL file path)--OK




------------------------------------------------------4. Clientie SettingsTrusted Site--ip Address join---------Define level--all Activex enabled
win7. NET security settings cmd Execute or save batch execution. Note to administrator permissions

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. Input in IEhttp://192.168.20.20/webdll/main.htm
The ability to manipulate data like WinForm
--Finished-------------


------------------------------------------------------perhaps to explore the question:1. Transfer data is also implemented with webserver (SQL connection file placed on server)2. Dynamic Join Menu3. Adding DLLs dynamically



Web display Winform,web Open Winform,ie open WinForm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.