[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Modernizing Visual Basic winforms

Posted on 2014-08-17
Medium Priority
Last Modified: 2014-08-18

I have become involved with a extremely large software team that has a lot.  (Millions of lines of code). It is migrating from vb6 to vb.net most recent frameworks.  The system has many external devices, some which may not have drivers outside of activeX.  

When i google " modernize" vb6 vb.net. I am lucky to get sites that are 3 years old.    I did a lot of vb 6 in my days then vb.net then c#.   It is mandatory we continue to do vb.net we have a large shop. No IIS web based solutions will work too many HIPAA issues.

Please if I could get any site references or advice on the most modern way to do vb.net and  any advice on handling old vb6 I would appreciate.
Question by:Charles Baldo
LVL 40

Accepted Solution

Jacques Bourgeois (James Burger) earned 1200 total points
ID: 40266546
Unfortunately, if you want code that is efficient, bug free and easy to maintain (if not simply saying maintainable), the only good solution, specially on large projects, is to rewrite everything in .NET.

The conversion tool generates code that tries to emulate as exactly as possible what the application did in VB6. .NET applications doe not behave the same way. Many things cannot convert (Data controls for instance), and you still have a lot of work to do after the conversion, a good part of it involving debugging of the generated .NET code. It's messy .NET code of a kind that no programmer would ever write. For instance, it will still use the old On Error GoTo, so you have to give up all the information that you can get from an Exception object if error handling is done with Try...Catch.

Maintainability becomes an issue because the code is hard to understand in places, and you need somebody who knows both VB6 and VB.NET to be able to grasp what is happening. VB6 programmers are getting scarce, and any good programmer who switched to VB.NET will not accept a job where he still have to work often with anything that have to do with VB6.

The only upgrades I have seen that worked (and in my job as a trainer I have seen a lot of conversions) where in VB6 applications that where doing most of their word in libraries (.dll), leaving only the interface in the executables. In such situations, it was quite easy to rewrite the interfaces in .NET and still use the old dlls, rewriting these only as needed. .NET works quite well with VB6 dlls if these do not use the Variant data type that has no equivalent in .NET.

As for modernizing, as far as design is concerned, while they were of limited use in VB6, classes become a must in .NET.

For the interface, it depends what you are aiming for. If you really want to go the Microsoft way, you tone down everything as they do in the new Windows RT (Windows 8) interface: remove the menus, monochrome icons, no gradients, one window at a time, touch enabled, and the likes, even in Windows applications.

If you are like me and most people I met, however, you want programs that are tools, not programs that are gadgets. You then need to retain a lot of the basic old appearance. Simply by using the controls provided by .NET, you will have a bit of "modernizing". You can enhance that maybe with something else than grey as a background, ribbons instead of menus (although some users prefer menus) and the likes.

Give a look at the commercial software your users are working with, and ask them what they like most and why. This will guide you in your decisions.
LVL 84

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 400 total points
ID: 40266776
skip winforms and go directly to WPF
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 400 total points
ID: 40267469
skip winforms and go directly to WPF
Hmmmm...  I was going to suggest that myself. However, you should be aware that there is a bit of a learning curve for WPF. You do get a bit better of a user experience, though. Be sure to do your research on WinForms vs WPF before you make a decision  = )

Author Comment

by:Charles Baldo
ID: 40267920
Thank you all.   You more or less let me know what I already thought,  We have a ton of vb6 programmers and a few vb.net.  I like the WPF path and have already brought it up.

Rewrite is the path but with millions of lines of code that is FDA and HIPAA requirements it will be slow.

Thank you all will divide points up

Author Closing Comment

by:Charles Baldo
ID: 40267922
Thanks All, no easy solution here that's for sure

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month19 days, 2 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question