Published: 07 Jan 2009
By: Eyal Albert

In this “How To” we are going to learn how to take an existing WinForms application and migrate it to the web.

Contents [hide]

Overview

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.

Let's Start

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.

Summary

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:

  • WinForms to Web - Migrating desktop applications part 1
  • VB 6.0 to Web - Migrating desktop applications part 2
  • Smart Client Technologies to Web - Migrating Desktop Applications part 3
  • <<  Previous Article Continue reading and see our next or previous articles Next Article >>

    About Eyal Albert

    Sorry, no bio is available

    This author has published 6 articles on DotNetSlackers. View other articles or the complete profile here.

    Other articles in this category


    Code First Approach using Entity Framework 4.1, Inversion of Control, Unity Framework, Repository and Unit of Work Patterns, and MVC3 Razor View
    A detailed introduction about the code first approach using Entity Framework 4.1, Inversion of Contr...
    jQuery Mobile ListView
    In this article, we're going to look at what JQuery Mobile uses to represent lists, and how capable ...
    Exception Handling and .Net (A practical approach)
    Error Handling has always been crucial for an application in a number of ways. It may affect the exe...
    JQuery Mobile Widgets Overview
    An overview of widgets in jQuery Mobile.
    Book Review: SignalR: Real-time Application Development
    A book review of SignalR by Simone.
    Top
     
     
     

    Please login to rate or to leave a comment.