Converting VB application to VB.net

S

sarah.clough

Hi all,

I have a project that was created in Visual Studio 6 using VB. Is it
possible to open this project in Visual Studio .NET and automatically
convert it into .NET, or do I have to manually convert it a bit at a
time? I did have a go at opening it up in VS.NET, but it didn't
recognise the libraries. Maybe I just need to tell it where to look,
but I couldn't work out how.

Cheers,
Sarah
 
A

Armin Zingler

Hi all,

I have a project that was created in Visual Studio 6 using VB. Is it
possible to open this project in Visual Studio .NET and automatically
convert it into .NET, or do I have to manually convert it a bit at a
time? I did have a go at opening it up in VS.NET, but it didn't
recognise the libraries. Maybe I just need to tell it where to look,
but I couldn't work out how.

What does "not recognize" mean? Which errors do you get?

First, you must make sure that the project is compilable in VB6 on the same
machine. If it's not event that, the wizard is also not able to upgrade it
due to missing information.

I think you know that using the upgrade wizard is only the first part of the
work. VB.Net is based on a completely new system and some/many basics
changed. Still the language syntax is pretty similar. Depending on the size
and structure of your VB6 project, you might have to do a lot of additional
manual work. Sometimes it's even better to redesign and rewrite the project
in VB.Net because there are different/better approaches now.

Armin
 
S

sarah.clough

Thanks for your prompt reply!

I wasn't using an upgrade wizard, I just created a blank project,
copied the files across and included them in the project, but I
couldn't get it to recognise the folders and directory structure. I'm
not very familiar with VB, and haven't used the .NET studio recently
except for C# web projects! This is a windows application, so I'm a
bit lost.

The errors I was getting is that is couldn't find the .h libary files.

Cheers,
Sarah
 
P

Phill. W

I have a project that was created in Visual Studio 6 using VB.
Is it possible to open this project in Visual Studio .NET and
automatically convert it into .NET, or do I have to manually convert
it a bit at a time?

No; it won't upgrade VB "proper" code for you (despite the existence
and/or claims of the so-called "Upgrade Wizard") and, even if it did,
what came out the "other end" of the process would run like a dog,
having to work around the simply *massive* differences in the two
architectures.

Even worse, unless you're prepared to venture out into the
Mysterious Land of InterOp, you can't even *rewrite* the
application "a bit at a time" (and yes; I really /did/ mean "rewrite");
you have to do the /whole/ application, all in one go.

HTH (but doubt it, sorry),
Phill W.
 
D

Dick Grier

To use the Upgrade Wizard, open the ORIGINAL VB6 project in VS .NET --
don't copy the code.

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 
A

Armin Zingler

Thanks for your prompt reply!

I wasn't using an upgrade wizard, I just created a blank project,
copied the files across and included them in the project, but I
couldn't get it to recognise the folders and directory structure. I'm
not very familiar with VB, and haven't used the .NET studio recently
except for C# web projects! This is a windows application, so I'm a
bit lost.

The errors I was getting is that is couldn't find the .h libary files.

*.h files are header files for C, not VB.Net. This one is a VB.Net newsgroup.


Armin
 
S

sarah.clough

You can find the Visual Basic Upgrade Wizard by clicking File | Open | Convert.

Ooh, I missed this reply before.

That's just what I need to get started, thanks!

The code is mostly calculations in classes, so will probably run okay
just using the converter for now.
 
S

sarah.clough

Oops, getting the error mixed up with another project somewhere. It's
definately a VB project I'm trying to convert! No need to go back and
check out the error that I actually did get now I've found the
converter, my method was fatally flawed anyway!
 
A

Armin Zingler

Ooh, I missed this reply before.

That's just what I need to get started, thanks!

The code is mostly calculations in classes, so will probably run okay
just using the converter for now.

Try to enable Option Strict. This helped me find some faults that haven't
been discovered in the VB6 project (and then could be corrected there). :)


Armin
 

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