This article will helps you to run Windows Application on Web
Try to use the Microsoft windows control, Avoid third party control.
Because we are going to use the same control on web
Reduces the coding time and resource needed for web
Bring the desktop to your web
Develop a windows application .For developing weather you can use windows controls
are third party control that’s not a matter.
1.open "New Project " select Visual C# Project and select windows application and
name the project as 'WindowsTOWeb' and click open (Ref :Figure 1)
2. Design the form as shown in the (Ref: figure 2)
3. When you run the form the form will look like this in windows (Ref: Figure 3)
4. Now we want to convert the windows application in to a usercontrol to convert the windows
application in to user control we need to follow the following steps
I> Convert the
public class Form1 : System.Windows.Forms.Form
public class Form1 : System.Windows.Forms.UserControl
(Ref: Figure 4)
II> Comment the
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
Of the windows
Now your windows form application is converted to user control
5. Now click the property of the project and change the “Output Type" from Windows
Application to Class Library (Ref: Figure 5)
6. Before compiling the project comments the "thread" (Ref: Figure 6)
Now You have successfully created the user control
7. Now add web application in the same solution it self (Ref: Figure 7)
8. Now create a strong name for your user control by using "sn.exe " which is in the location
'C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin'.The syntax for creating the
string name is
"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\sn -k "C:\Strongname.snk"
now the strong name has been created and it is in the c: in the name of strongname.snk
9. After creating the strong name specify the path of the strong name in "Assemblyinfo.cs "
file in the [assembly: AssemblyKeyFile("c:\strongname.snk")] attribute
Now the first way of using the user control in the web
10. Now by using the "regasm.exe" create and place the CLSID of your dll in the registry
the exe file which is in the location "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ ".
11. Then by using the Gacutil.exe register your WindowsToWeb .dll the the registry
Then go to the registry and search by the name "WindowsToWeb.dll" and copy the CLSID to the
code behind as Specified in the figure (Ref: Figure 8)
12. Now you can see the windows control in the web form (Ref: figure 9)
13. Run your web application. Congrats your windows control is now on web
This is the sample application which I have created when I am in position to run
the windows application which I have created on web page. By using this you
can run only the simple application
I am Prabakar working as Software Engineer .I had been working in Microsoft Platform for the past 3+ years.I have also completed MCP.