Canadian ISV Evangelism Team

Upgrading VB applications to VB.NET

One of the questions we get asked from time to time is what guidance can you give with regard to upgrading a Visual Basic 6 application to VB.NET. Fortunately Microsoft has published a wide range of material addressing just this subject.

Before deciding to upgrade an application from Visual Basic 6.0 to Visual Basic .NET, it is helpful to understand why you should consider upgrading at all. Usually, you have business requirements that compel you to upgrade an application from Visual Basic 6.0 to Visual Basic .NET. Common reasons, or drivers, to upgrade an application to Visual Basic .NET are:

  • To Web-enable the application, or enhance an existing Web-enabled application with ASP.NET features.
  • To take advantage of the improvements in developer productivity and the enhanced development features that Visual Basic .NET, the .NET Framework, and Visual Studio .NET provide such as Web services.
  • To consolidate your company’s software assets improving system integration and reducing the overhead of needing experts on different platforms.
  • To reduce the cost of ongoing business activity. For example, the increased scalability and performance of applications that are upgraded to Visual Basic .NET, and the increased productivity of developers, can reduce the costs of regular business activity.
  • To improve the maintenance of an application in any of these situations:
    • Your business does not have an in-house expert on the application.
    • Your business has a high turnover of staff.
    • Your business does not have enough resources to support the application.
    • The available documentation is limited or outdated.

Microsoft has put together an extensive set of guidelines at Upgrading Visual Basic 6.0 Applications to Visual Basic .NET to help developers ease the migrating process. These guidelines provided a platform for understanding obstacles that might be encountered migrating different kinds of applications.

There are a few features in VB6 that are not supported in VB.NET. Those features are:

  • OLE Container Control
  • Dynamic Data Exchange (DDE)
  • DAO or RDO Data Binding
  • Visual Basic 5 Controls
  • DHTML Applications
  • ActiveX Documents
  • Property Pages

Due to the differences between VB6 and VB.NET most applications will require some rework for components that cannot be mapped directly to a component of VB.NET. The easiest way to determine the amount or rework required is to use the Upgrade Wizard available in Visual Studio and review a list of issues in the upgrade report the wizard generates.

Another tool you have in your arsenal is the Visual Basic 6 Code Advisor. The code advisor is an add-in that once installed can scan existing VB6 projects to ensure they meet predetermined code standards. The Code Advisor can suggest changes and best practices to ease your migration from VB6 to Visual Basic .NET, and enables you to create custom scanning rules to check your VB6 code for compliance with your own personal or development team best practices.

Arming yourself with as much information as possible is your best approach in converting your applications. Microsoft has published a free book on the subject of converting your applications. Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET is the complete technical guide to upgrading Visual Basic 6 applications to Visual Basic .NET, covering all upgrade topics from APIs to ZOrders.

Thanks,
John Hinz

Developer Advisor
Microsoft Canada

Published Tuesday, March 24, 2009 9:24 AM by jwake@microsoft.com

Comments

 

infoblog » Upgrading VB applications to VB.NET said:

March 24, 2009 9:41 AM
 

rseder said:

Another important aspect is that Visual Studio v6.0 (along with VB 6.0) went end-of-life in April of 2008, I believe. So if you still have an application written in VB6, there is no longer ANY support from Microsoft for the tools!

March 24, 2009 9:48 AM
 

Canadian Developer Connection said:

There are a lot of applications out there today that were built using Visual Basic 6, Microsoft’s last

March 24, 2009 10:51 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker