Converting VB6 to VB.NET

Brad wrote,

The VB6 to VB.NET converter doesn't seem to exist anymore. Microsoft sent me to Artinsoft. They apparently have a good one, but it will cost me $6000 to use for my smaller project and gobs more for the larger one.

Are there any competitors out there? Are there other choices beside recoding by hand?

Unfortunately, Microsoft's policy these days seems to be, "What part of 'We don't support VB6 anymore!

' don't you understand?" I've blogged long and hard that this is a mistake for Microsoft so I won't plow that ground again. Microsoft does provide a small amount of support. For example, there's the Interop and Upgrade forum where you can ask questions. I blogged the announcement of a new third-party VB6 website back in 2007 called I checked them again for this blog and they're still online!

Inevitably, you will have to abandon VB6 some day. It's better to plan for an orderly transition than to be forced to do it in emergency mode when something breaks.

But you do have options!

First, you can continue to run VB6 programs and even develop using VB6 on even the latest version of Windows. (If you can find a VB6 system. You can't buy one at retail anymore but you can still get one with an MSDN subscription.) You have to install the system with an Administrator account. Some people have reported that Windows 7 must be run in Windows XP mode for best results in developing VB6 systems but the runtime is supported by all versions of Windows.

When you do decide to convert, you'll have to do it in two steps if you only use Microsoft products. As Brad discovered, Visual Studio 2010 doesn't include the VB6 conversion wizard anymore. But you can still download VB.NET 2008 Express. (Act fast! That won't last forever either.) 2008 does include the wizard.

After that, you can convert the VB.NET 2008 code to VB.NET 2010.

Conversion of VB6 code usually only works for relatively small systems that don't involve a great deal of VB6-specific technology. The fact is that straight conversion projects of complex VB6 systems usually run into a wall after the easy part is done. The differences between the two languages are just too great. A great resource for deciding what to do can be found in this Microsoft blog: Rewrite vs Migrate vs Reuse vs Replace. The Microsoft Patterns and Practices group also has an article that will help: Upgrading Visual Basic 6.0 Applications to Visual Basic .NET and Visual Basic 2005.

If you do decide to go the conversion route, the software to help can be pretty pricey, as Brad found out. The main commercial competitors are ArtinSoft and VB Migration Partner. ArtinSoft prices their product by lines of code (LOC) and pricing starts at $800 for up to 10,000 LOC. VB Migration Partner doesn't quote a fixed price; they like to give you a bid after looking at your project.

While researching this blog, I ran into a message on another page that was so good that I decided to quote it in this blog. Addressing the same question, Darrel Miller wrote:

a) Hire someone with a significant amount of experience in building large .NET applications to come and guide the project and teach you.

b) Extract the business requirements from your current application and freeze them.

c) Celebrate the fact that this should be the easiest greenfield application development project ever because you have someone with experience in the technology to guide you, you have mature tools to build the application with and have a well defined set of requirements, so you know exactly what to build.

P.S. At this point I would not bother with Winforms. I would jump straight to WPF, you'll thank me later.

P.P.S The language really does not matter (C# or VB.Net). The effort will be the same.