How to Migrate a WinForms application to the Web using Visual WebGui

Visual WebGui introduces a new platform to develop web applications and migrating desktop applications to the web. In this “How To” we are going to learn how to take an existing WinForms application and migrate it to the the web.

First thing we need is a Winforms application. I will use a calculator application written in VB.Net.

Let’s open the project in Visual Studio and run the application to see how it works as a Winforms application.

image      image

Add a new Visual WebGui application by right click on the solution and selecting Add->New Project…

image

Select a new Visual WebGui application.

image

 

Delete from the new VWG application the Form1.vb file and drag the Form1.VB from the WinForm project to the VWG project.

image   image

Next we will replace the the old references to System.Windows.Forms with the equivalent reference in VWG Gizmox.WebGUI.Forms. Press Ctrl\Shift\H combo to display the Find and Replace form and enter the text that we want to replace and press the replace all. In the end of this process all the references should refer to VWG forms.

image image

Now lets set the VWG project as the starting project by right clicking the project and selecting Set as StartUp Project

image

Next we will set the starting form of the application. Right click on the project and and open the project property page. In the Web section set the start up action to specific page Form1.wgx.

image

Now lets run the application and see or WinForms application run as a Web application..

image

 

 

 

 

To summarize:
We have seen how to migrate an existing WinForms application to a web application using Visual WebGui.

You can read the original how to here 

-- Eyal Albert @ Eyal.Albert (at) Gizmox.com

1 Comment

Comments have been disabled for this content.