VB6 to .NET Migration: Strategies, Challenges — Abto Software

Abto Software
7 min readOct 30, 2020

Why is a question about VB6 to .NET migration so timely? Visual Basic (VB) was created by Microsoft in 1991 and became very popular. A lot of in-house applications for enterprises were implemented along with an ecosystem of third-party components.

But later, Microsoft abandoned Visual Basic in favour of the modern .NET Framework. The final VB release was version 6 in 1998. Visual Basic 6.0 IDE is not supported anymore. According to Microsoft, Windows supports core VB6 functionality which is “used in the majority of application scenarios” under the so-called “It Just Works” commitment.

Why migrate from VB?

So should companies go for VB6 to .NET migration? The short answer is Yes. Microsoft itself published an article “Why is it a great time to stop developing in Visual Basic 6.0?” in 2009, 12 years ago.

VB6 security vulnerabilities

Most importantly, Visual Basic might unexpectedly stop running. As a low priority process, VB6 support is not verified extensively in Windows updates. And that leads to the growth of VB6 security vulnerabilities.

In 2019 a BlueKeep vulnerability in Windows was found, and a patch was released. But that update broke the functionality necessary for VB to run. Windows recommended automatic updates for security reasons. However, they just made VB applications to stop responding with an “invalid procedure call error”.

It took several days for MS to release an update to address the VB issue. During that time, customers were left with two options — don’t run VB apps or don’t install BlueKeep-related updates and be susceptible to viruses.

At the same time, the US National Security Agency and Microsoft itself stated that virus attacks using BlueKeep could be similar in scale to EternalBlue-attack such as the notorious WannaCrypt. That “worm” encrypted the whole hard drive and demanded a ransom in bitcoins. No wonder it got a nickname from frustrated victims as WannaCry.

A closer look at Microsoft’s pledge to support VB core reveals that they never promised to uphold everything. Users might experience strange behaviours of applications, cryptic error messages, and crashes resulting in data loss. The core VB might work, but third-party components written in VB6, such as OCX/ActiveX controls, might stop working.

Customers are advised to contact original vendors. The thing is, a lot of these vendors also don’t provide support for their old programs. Sometimes, they even are not present in the business anymore. All this makes the need for VB6 to .NET migration quite obvious.

Eventually, all companies will face no choice but to rewrite their applications. Take as an example the recent 2020 case with the US government systems working on COBOL. It shows that the longer the problem is postponed, the more costly it is to resolve.

Ancient languages like COBOL and Visual Basic don’t attract current students. As a result, the number of experts is dwindling each year. Scarce programmers willing to work in that field must be paid exorbitant salaries.

Also, problems arise because old languages used old architecture approaches. Such “spaghetti code” drastically increased the complexity of the applications. These old applications are usually poorly documented. Moreover, people who remembered what they should do, don’t work in a company anymore. Reverse engineering of such legacy applications earned the name “software archaeology”.

All companies must evolve to keep up with their competitors. Company software entails a change in processes, integration with new industry-standard applications. Business growth demands program scalability, and modern enterprises are going web, cloud, and mobile. These all are either very expensive or even impossible in Visual Basic.

How to choose VB6 to .NET migration strategy?

Now, what can we do when a company is ready to start a transition to the new technologies? There are three possible VB6 to .NET migration strategies:

Let’s discuss every one of them in more detail to convert VB6 to .NET with no problems.

Extension

The extension strategy is for your application if:

  1. The application works fine;
  2. Described above issues and risks are accepted;
  3. You need to develop new features with fewer efforts and costs.

Additional modules can be called from within old applications. You can leave a legacy as it is but implement new stuff with some modern framework. Eventually, old modules that are still relevant to the business can be also migrated to .NET. This approach is well-known as a “strangler” pattern.

Migration

A good choice in case:

  1. An old application works unstably;
  2. It annoying users with frequent errors, sometimes even causing work loss;
  3. The number of users is relatively constant;
  4. Business processes are attuned to the desktop experience.

This VB6 to .NET migration strategy might be. The resulting code requires manual adjustments for specific parts that are conceptually different in those languages, for replacing OCX/ActiveX controls. Also, upgrading from default for converters Windows Forms to the newer started with automated converters that take Visual Basic code and translate them to is desirable.

Abto has good experience in implementing the Migration strategy. For example, we convert VB6 to .NET for a charity platform for an international company. Also, our team provided VB6 to WPF migration for a leading manufacturer.

Rewriting

The third VB6 to .NET migration way is a complete rewriting to the .NET Framework. This approach is required when:

  1. The migration is done from the legacy desktop VB6 application to another platform. These transitions can support the extending base of users by scaling into the cloud;
  2. The company want to extend market share by giving users simple access via the web and features at hand via mobile applications;
  3. The original application is totally outdated. It does not satisfy business in significant areas thus major overhaul is anyway necessary.

As an example, Abto Software implemented the Rewriting approach for the US retail company. We modernized and migrated legacy ERP to the web.

What are VB6 to .NET migration challenges?

If you want to convert VB6 to .NET, you have to consider some important things in advance. And it’s not only choosing the right migration strategy. You need to make sure your code is prepared for migration and won’t need extra time for improvement. You need to be ready to fix bugs as soon as possible. And, of course, to find and assemble the team who will perform VB6 to .NET migration in the best way possible.

Steps to consider before migration

Code audit

It is always a good idea to check your software before migration. Are there code lines that do nothing and go nowhere? Cleaning up your code before migration will save time for developers and the number of expenses for a business.

Third-party controls check

There are a lot of third-party controls that are often used for Visual Basic applications. And some of them are not compatible with .NET. If you continue using them, it can decrease your .NET app performance and speed. Does your software have third-party controls like that? It will be good to find alternatives for them.

Quality Control

Quality Control is important during migration as well as before it. If your code is unclear and has many bugs, the better decision will be to choose a rewriting migration strategy. If you convert poor quality code VB6 to .NET automatically, you will have to spend too much time on bug fixing. For business owners, it means lost time and money.

Bug Fixing

This step is quite obvious. Better preparation before VB6 to .NET migration will help to reduce the number of bugs significantly. Do not postpone bug fixing to give your app users the best user experience.

Improving application

After finishing migration and bug fixing, it is always a good idea to think about how you can improve your software. Isn’t it outdated? Does it cover all business needs? Are there some functions that need reimplementation? For example, we not only provide vb6 to c# migration for our customer. We also rewrite slow AutoCAD functions. As a result, we save 75% on the license costs for our client’s software users.

Right team

VB6 to .NET migration is a necessary but painstaking process. Provided professionally, it brings growing opportunities for business. Make sure your development team is a team of professionals with good experience in .NET Framework. The best way is to choose a company that has Microsoft Certification and positive reference from previous clients.

Conclusions

VB6 to .NET migration is necessary for every business that wants to stay on the market and be compatible. But as well as in any other business areas, it is crucial to entrust your software development to professionals.

Want to find out more about our experience? Check out case studies about award-winning e-Procurement and e-Sourcing software used worldwide, a suite of digital retail solutions for a Swiss retail software provider, and EMR & medical practice management software for our US customer.

Discover how .NET development can benefit your business! Contact us by filling out the form below.

--

--

Abto Software

We empower customers business with innovative software by applying science, R&D, and own IP at abtosoftware.com