I just inherited control of a largish VB6 codebase. It doesnt have much in the way of active X other than the crystal reports engine and MS access work it does. I want to move it to .net before the tool set and skill sets dry up completely (if they havent already).

Can anyone recommend any good tools to convert/migrate vb6 code to How did the tool help you and what kinds of things did it not do for you?


I think Visual Studio has a conversion tool for this type of conversion

Varun Mahajan
+2  A: 

I used the VB6 Upgrade Advisor from Microsoft to convert an application. It will scan your code and make recommendations on changes that will make the automatic conversion in Visual Studio work better.

The biggest issue, in my experience, was with control arrays. They're not supported in .net, but they do get converted in a kludgy way that makes refactoring difficult after the conversion. Do the refactoring before the conversion if possible.

thanks for the feedback. anything that I can use to improve the chances of success/hassle later are a big plus
The upgrade advisor is underpowered, look here for more suggestions instead.
+2  A: 

Yep, you can open the VB project file with VS and it does the conversion.

Of course don't expect that everything will work as a charm, but it will save a lot of work for you.

Here is a link to show you the process.

thanks. I am just getting started on this so this is a big help
+2  A: 

I have used MS's conversion tool, and would only recommend it for a project that is already well architected and written.

Otherwise, you are just moving a bad application to a new technology. Just bear in mind that you will most likely need to do some refactoring.

+2  A: 

The short answer is that VB6 and VB.NET (and consequently C#) are separate language but related languages. There are many subtle (Integer being Int32 instead of Int16) and gross differences (graphics, form, and printing engines) between the two platforms. You need to treat this as if you are converting to a completely different platform.

The one type of project that the conversion utility in Visual Studio should work well on is the a database front end using Crystal Reports. Crystal Report sidesteps the problem of the incompatibility between the native VB6 print engine and .NET print engine. The remaining issues will likely be control arrays and if any the native VB6 graphics commands are used (Line, Circle, etc).

The issues are explored more fully here

How to Switch a Large App from VB6 to VB.NET

RS Conley
Yes. Thanks for the advice. I did read the post you mentioned before posting my question. what I am looking for is the relieve from some of the tedium such as control placement, using statements, and the tedius parts of the conversion. i know this is going to be a bag of hurt.
+2  A: 

You really need to look at

I haven't used it but it's by Francesco Balena for God's sake. If anyone can port vb from classic to .net he can.

+1  A: 

VBDepend can help to understand the existing vb6 code before migration, and accelerate the process during migration.

Issam Lahlali
+1  A: 

Visual WebGui together with VBUC from Artinsoft provides migration tools and services from VB6 to .NET and even all the way to Cloud. The tools are being automated to allow as little intervention as possible in the migration process.

This video demonstrates the process.