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 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.
Add a new Visual WebGui application by right click on the solution and selecting Add->New Project…
Select a new Visual WebGui application.
Delete from the new VWG application the Form1.vb file and drag the Form1.VB from the WinForm project to the VWG project.
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.
Now lets set the VWG project as the starting project by right clicking the project and selecting Set as StartUp Project.
Next we will set the starting form of the application. Right click on the project and open the project property page. In the Web section set the start up action to specific page Form1.wgx.
Now lets run the application and see or WinForms application run as a Web application.
We have seen how to migrate an existing WinForms application to a web application using Visual WebGui. To learn more about the various migration options of desktop/smart client applications to the web read the following articles: