I have found that some developers don’t convert VB6 to VB.NET because of all the problems they have encountered in the past. Visual Studio .NET includes a conversion mechanism to convert VB6 to VB.NET. Did you know that the conversion engine is seemingly incapable to alter more radical property settings? Although this is objectively communal for everything but insignificant controls, the conversion engine flops with a program exception commonly while analyzing the form, beforehand even if it attempts to load ActiveX control form libraries.

After converting the forms to VB.NET, the property _Flat Properties property should again be set to False. Also you would want to upgrade the VB6 Windows Forms applications to Windows Presentation Foundation (WPF) as this is the future of Windows programming. WPF uses XAMIL to define the layout of the interface, which makes creating GUI easier in .NET. When it comes to compatibility, VB6 and VB.NET applications can be installed and run on the same computer as their components have good interoperability.

Converting VB6 to VB.NET is hard:

  • VB6 existed for the only reason of being able to hide the complexities of COM. VB.NET is entirely based on COM exposing its complexities.
  • Problems related to multithreaded Windows Forms were resolved in VB6 by blocking it. VB.NET utilizes WinForms as it is an essential graphical user interface API for creating applications.
  • In most cases the migration path is complex and even with the upgrade wizard it is common to have 30-40% dead code for a normal size project. As a result many VB developers find it difficult to make a decision and get stuck.

To successfully convert VB6 to VB.NET requires modifications. No matter what ever upgradation tool you use, there is not a completely automated, error free way to convert VB6 to VB.NET. A lot of programming and code review are required to fix the errors and debug the upgraded VB.NET application. It is a healthy mix of automated and manual coding efforts that go hand-in-hand for a developer who is involved in the migration process. Writing understandable codes and commenting every procedure makes the developer’s life a lot more-easier during application conversions. Just because there is VB in the name don’t be fooled that it is going to be easier. Improper planning and not doing it right from the start will no sooner put your project in trouble.

VB6 to VB.NET migration tips to developers:

  • Remove inoperative VB.NET codes generated by the upgrade wizard, as it may lead to slower execution.
  • Split complex procedures that are long and hard to understand. It is advisable to use variable length strings as it occupies less memory.
  • Reusability is the key word for converting VB6 codes to VB.NET. Reusing procedures, code or class modules greatly reduces the conversion effort and time.
  • Bring out the application logic from forms and modules and into classes and components. It is easier to migrate classes to VB.NET than to migrate modules.
  • VB6 methods tend to be slower than their VB.NET counterparts. So it is essential to go through each line of code and replace each VB6 method with its .NET counterpart.

By considering the above tips developers can get your application perform faster in VB.NET. If you have a VB6 to VB.NET conversion project with a lookout for a trustworthy partner then your search ends here Contact Us

To learn more about VB6 to VB.NET conversion read our other blogs.

Editor’s Note: This post was originally published in February 2015 and has been completely revamped and updated for accuracy and comprehensiveness

Arif Khan
Project Manager at Macrosoft Inc
Arif has over 18 years of software development and management experience that includes Analysis, Designing, Documentation and Implementation of Object Oriented customized solutions for the various industries ranging from Financial, Telecommunications, Health Care, and other various consumer markets.
WordPress Image Lightbox