Click here to Skip to main content
Click here to Skip to main content

Using Windows Application on web

, 29 May 2006
Rate this:
Please Sign up or sign in to vote.
This article gives you brief idea of how to run your windows application web

Introduction

 

This article will helps you to run Windows Application on Web

 

Note:

                Try to use the Microsoft windows control, Avoid third party control.

                Because we are going to use the same control on web

 

Advantages:

 

Reduces the coding time and resource needed for web

Bring the desktop to your web

 

 

Requirement:

 

Develop a windows application .For developing weather you can use windows controls

are third party control that’s not a matter.

 

Process:

 

1.open  "New Project "  select Visual C# Project  and select windows application  and

name the project as  'WindowsTOWeb' and click open (Ref :Figure 1)

Sample screenshot

           2. Design the form as shown in the (Ref: figure 2)

Sample screenshot 

 

           3. When you run the form the form will look like this in windows (Ref: Figure 3)

Sample screenshot          

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

                                                   TO

                   public class Form1 : System.Windows.Forms.UserControl

  (Ref: Figure 4)

Sample screenshot

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)

Sample screenshot

6. Before compiling the project comments the "thread" (Ref: Figure 6)

 

 

Sample screenshot

Now You have successfully created the user control

 

7. Now add web application in the same solution it self (Ref: Figure 7)

Sample screenshot 

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)

 

Sample screenshot

 

12. Now you can see the windows control in the web form (Ref: figure 9)

 

Sample screenshot

13. Run your web application. Congrats your windows control is now on web

Sample screenshot 

 

Conclusion:

 

            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  

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

as_prabahar
Web Developer
United States United States
I am Prabakar working as Software Engineer .I had been working in Microsoft Platform for the past 3+ years.I have also completed MCP.

Comments and Discussions

 
QuestionUnable to create Pinmemberwrappingduke9-Jan-14 12:00 
QuestionStuck at 8 step PinmemberDSrini11-Jun-13 0:10 
QuestionAfter step 13 Pinmembershyam.vegeta14-Mar-13 5:54 
QuestionProblem at step 8 PinmemberHhiren13-Feb-12 1:40 
QuestionHi PinmemberMember 772166127-Jun-11 5:07 
Now i get the Page in the IE, But it is not displaying the controls
 
Getting Blank page with picture of cross mark in that, i am using .net 2008 and windows 7 server os, can u pls help to sort out this problem.
QuestionHI PinmemberMember 772166127-Jun-11 4:22 
QuestionWhy i cannot find CSLID in registry ? Pinmemberwcwong221-May-10 18:56 
GeneralThanks to all PinmemberPrabakar Samiyappan3-Nov-08 22:57 
Questionneed help for do this procedure.doubt on 10th and 11th steps. PinmemberAlexisraj29-Sep-08 23:43 
GeneralFirefox the windows form is not displaying PinmemberLakshmi Sunitha10-Apr-08 1:58 
GeneralUsing Windows Application on web PinmemberEzhil_yoga26-Nov-07 20:22 
GeneralRe: Using Windows Application on web PinmemberAlexisraj30-Sep-08 0:22 
GeneralCLSID set up PinmemberMyDays12-Mar-07 13:07 
General.exe files for web application PinmemberMyDays12-Mar-07 11:14 
QuestionStuck at Step 11 PinmemberMihir_999_78617-Oct-06 12:28 
GeneralStrong name PinmemberAndyHug8-Jun-06 20:45 
GeneralStopped at step no 10 PinmemberAndyHug7-Jun-06 22:46 
GeneralRe: Stopped at step no 10 PinmemberAndyHug7-Jun-06 23:40 
GeneralRe: Stopped at step no 10 Pinmemberasprabahar8-Jun-06 7:14 
QuestionRe: Stopped at step no 10 Pinmemberdotguru26-Jul-06 2:57 
AnswerRe: Stopped at step no 10 PinmemberE. H.1-Aug-06 6:04 
GeneralRe: Stopped at step no 10 Pinmemberasprabahar28-Sep-06 1:10 
GeneralRe: Stopped at step no 10 Pinmemberasprabahar8-Jun-06 7:16 
GeneralRe: Stopped at step no 10 PinmemberSteve Tellijohn15-Jun-06 4:49 
AnswerRe: Stopped at step no 10 Pinmemberasprabahar28-Sep-06 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 29 May 2006
Article Copyright 2006 by as_prabahar
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid