1. Home
  2. Computing & Technology
  3. Visual Basic
New Upgrade Wizard Tricks
MS has improved the Upgrade Wizard in VB .NET 2003!
We check out how 'improved' it really is ....
The VB .NET Upgrade Wizard

About Visual Basic has consistently recommended that you avoid giving Bill any more money than you absolutely have to by buying the Microsoft Press VB .NET Learning Edition instead of the retail version of VB .NET. The Learning Edition has a complete VB .Net Standard Edition bundled with it. One of the very few disadvantages of buying the 1.0 version of VB .NET Standard was that you didn't get the Upgrade Wizard. This was only included with complete Visual Studio versions. (You did get Visual Studio with VB .NET Standard. Just think of it as more Microsoft marketing doublespeak.)

I'm pleased to report that this error in Microsoft's judgement has been corrected now with VB .NET Standard 2003. They evidently realized that it was to their interest to get as much code converted to VB .NET as possible and you get the Upgrade Wizard bundled with it this time! And Microsoft claims that the Upgrade Wizard itself has been vastly improved. As an About Visual Basic analysis demonstrated, the previous version had problems. Let's see how well it does this time around.

 More of this Feature
• Part 2: The Upgrade Wizard Conversion Errors
• Part 3: Converting a Control Array: The Wizard Way
• Part 4: Converting a Control Array: A Better Way
 
 Related Resources
• MS Press Deluxe Learning Edition for VB .NET
An About Visual Basic Review
• TicTacToe and the Upgrade Wizard
• A First Introduction to VB.NET Controls
• More Customizing VB.NET Controls
 

The VB .NET Upgrade Wizard

--------------------------

Since I analyzed the TicTacToe program in a previous article, it seemed like the right program to test first in looking for improvements. So I plugged the TicTacToe VB source files into the 'new, improved' Upgrade Wizard and got exactly the same error report. No improvement here!

Although there seems to be minimal improvement in the Upgrade Wizard, there is a lot you can learn from analyzing how it does things. In this article, we're going to see how the Upgrade Wizard does on one of Microsoft's own VB 6 sample programs: the Calculator program.

This is a relatively simple example that duplicates much of the familiar Calculator utility that has been part of Windows since Bill only needed nine figures to count his money. The main calculator Form is shown below.

You can find this one in most VB 6 installations at:

C:\Program Files\Microsoft Visual Studio\MSDN98\98VS\1033\SAMPLES\VB98\Calc

Calc VB Sample Form

One reason Calculator is a good program to study is that it depends on the use of one of the main VB 6 techniques that has 'gone missing' in VB .NET: Control Arrays. In addition to being a main part of Calculator, they were also used a lot in TicTacToe. In this article, I'll show you two ways to solve the Case of the missing Control Arrays: The Upgrade Wizard Way and the VB .NET way. In the process, we'll learn a few lessons about VB .NET.

Starting the Upgrade Wizard is simplicity itself. You can either open a VB 6 project in VB .NET or you can select File > Open > Convert ... in Visual Studio .NET. Using either method starts the same Wizard. VB .NET 2003 also has a new trick. You can convert little chunks of code rather than complete projects using the Convert item on the Tools menu.

The result of converting Calculator is .... <drum roll please> .... Success!

There are no Global Issues, 5 Errors and 14 Warnings. But the bottom line is that, without changing a thing after running the Wizard, the resulting program runs.

Let's look at what the Upgrade Wizard found.

Next page > The Upgrade Wizard Conversion Errors > Page 1, 2, 3, 4
Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.