Easily upgrade B to VB.NET

H

hulkko123

Hello people!

I got a nice task, upgrading a VB 6.0 project to VB.NET.
I opened VB 6.0 project file with VS.NET 2003 and a new project
was created. But, of cource there were tons on errors or warnings.

You might quess my question: What is the easiest way to correct those
errors and warnings, are there any tasklist or notes which could give a
good and
fast help for upgrading?

I found pdf book "Upgrading Microsoft Visual Baisc 6.0 to Microsoft
Visual Basic .NET"
from Microsoft's website but ... isn't there any other thinner document
telling the most
common errors that comes when upgrading fromb VB 6.0 to VB.NET?
My main programming language is C# so VB is not my strongest part.

Cheers!
 
H

Herfried K. Wagner [MVP]

I got a nice task, upgrading a VB 6.0 project to VB.NET.
I opened VB 6.0 project file with VS.NET 2003 and a new project
was created. But, of cource there were tons on errors or warnings.

You might quess my question: What is the easiest way to correct those
errors and warnings, are there any tasklist or notes which could give a
good and
fast help for upgrading?

I found pdf book "Upgrading Microsoft Visual Baisc 6.0 to Microsoft
Visual Basic .NET"
from Microsoft's website but ... isn't there any other thinner document
telling the most
common errors that comes when upgrading fromb VB 6.0 to VB.NET?

There is no easy upgrade path from VB6 to VB.NET. I strongly recommend to
learn VB.NET prior to upgrading the project!

Sime resources on upgrading:

Migration
<URL:http://msdn.microsoft.com/vbasic/reference/Migration/>

Upgrading Visual Basic 6.0 Applications to Visual Basic .NET and Visual
Basic 2005
<URL:http://www.microsoft.com/downloads/...A9-CBED-485F-BFD5-847FB68F785D&displaylang=en>

Coexisting with Visual Basic 6.0
<URL:http://msdn.microsoft.com/vbasic/learning/coexistingwithvb6/>
 
M

mcnewsxp

depends on your timeline.
you can learn a lot by just fixing the error, but you want to get away from
using the vb6 namespace eventually.
late binding errors were most common for me.
it doesn't like for you to simply declare something as an object and assign
it to something specific later.
the printer object is no good anymore and printing in general is a new
animal.
commondialog stuff will give you grief.
 
M

Make

I tested SharpDvelop Ide.

Phases: VB to VB.NET with Visual Studio.NET
and then with SharpDevelop VB.NET to C#.

Lot's of fixing ... at least in my application.
Those wizards just can handle all code that should be
converted. But maybe you will get a skelton for your .NET application.
 
S

ScottL

Within the last year I was tasked with upgrading a large number of VB 6
projects to VB.NET, all of these tips are when working with the VS IDE

I found the best thing that worked for me was to use the original
Visual Basic 6 code in .Net.

First, go through and remove all old VB6 style error trapping and
upgrade to the new try catch structure.

I then turn on Option strict for all classes, this will help you with
object references and late binding issues. Once you have taken care of
all object related issues, it is best to remove all VB6 compatability
items(for example, string functions, left, right, etc., Format,
FileSystemObject, etc.) The easiest way to catch all of these is to
remove the project reference to system.visualbasic.compatability and
then take a look at the task list.

These steps helped familarize me with the VS .NET IDE, and also adapt
to the intricacies of .NET vs. VB6
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top