简体   繁体   中英

Have legacy VB6 code that needs to be converted to VB.net

So I have a rather complicated application written in legacy VB6 that I have been tasked to update to current VB.net to work on more machines.

My question is if it would be easier to attempt to find a converter to do it rather efficiently or should I bite the bullet and attempt to take the rest of the summer to rewrite this beast of an application?

I am not a programmer by trade (physicist, actually) and I have minimal experience working with VB since high school... Any advice is greatly appreciated!

A converter will likely take less time to get you to a working end result, but it will still likely require a lot of fixes. However, in the end, you'll end up with even uglier code than it probably already is. If you have the time and ability to do so, it's a great opportunity to redesign the code as you translate it into the new language. There are many new features in VB.NET that likely won't get utilized if you use a converter. It's just a matter of what's more important in your situation: speed, or quality.

If you do decide to go with using a conversion tool, I would definitely visit the Microsoft Visual Basic 6.0 Migration Resource Center . They have links to a Visual Basic 6.0 to Visual Basic .NET Upgrade Assessment Tool -- which you can use to evaluate your VB6 code prior to conversion -- and other information.

Your two main options are to use the Conversion Wizard that comes with Visual Studio 2005 or 2008 -- MSFT didn't include it in VS 2010! -- or to use the free copy of ArtinSoft's Visual Basic Upgrade Companion (VBUC) . I would recommend the latter -- it appears to be more sophisticated than the MSFT VS Wizard -- but it will only freely convert a project that has up to 10,000 lines of code. Any more than that, and you'll have to shell out $$ for a license.

I am not a programmer by trade

If you want to learn VB.Net and are not easily intimidated by massive projects, do the conversion yourself. Depending on the scope of the application, you can perform the conversion in steps although it is painful (and I don't recommend it).

Otherwise, a conversion tool is what I recommend. I'm not a VB.Net, so others may have some better advice. I do not expect that a conversion tool would be 100% accurate but should provide a very easy platform for continuing the conversion.

Another option is to hire a conversion company. The one we chose is called CodeArchitects. They provide a conversion engine and or consultation services that provide a turnkey solution (http://www.vbmigration.com/). I had them convert an vb6 application to vb.net for my company. That went pretty well and the cost was less than if i took months away (from development/enhancment etc) to do it myself. One note is that you will not get the learning experience from actually doing it yourself (i am transitioning from vb6 to vb.net, finally). Hope this helps..

My experience is that automatic converters do not do a good job of doing this kind of thing.

Although it seems like a daunting task I would suggest hand coding is preferable. However - do not underestimate this task either.

I personally would be nervous of someone who (by their own admission) wasn't a programmer doing this work.

If you have not done already download the Microsoft Code Advisor Add-In - this will alert you to some of the more glaring issues that need addressing before embarking on an upgrade.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM