Change from vb6 to vb.net

R

Raymond Chiu

Dear All,

I have the vb6 program. I am planning to convert this to be vb.net and
asp.net 2.0 program. I think I need to recreate all forms but as to class
modules, modules code and designer in which how can I convert them to be
vb.net common functions or others and crystal reports or .net reports? Any
suggestions???

I am using vs 2005 with asp.net 2.0 and on sql server 2000 and windows 2000
server.

Any ideas are welcome.

Appreciate your help.

Thanks,
 
S

SurturZ

Rewrite the code from scratch. VB.NET is sufficiently different from VB6 to
make automated conversion useless, and you'll learn the new syntax as you
re-write.

It's well worth the effort though, VB.NET is ten times better than VB6. I've
been programming in MS BASICs since QuickBasic 4.5, so take my word for it
that you should move to VB.NET ASAP.
 
O

\(O\)enone

SurturZ said:
Rewrite the code from scratch. VB.NET is sufficiently different from
VB6 to make automated conversion useless

Personally I disagree. I've upgraded a huge number of projects from VB6 to
..NET over the last few years and in every case I've started with the .NET
upgrade wizard.

The code that came out the other end was indeed full of errors, and I
actually wrote my own program to correct a lot of these (many of the things
it corrects are specific to the environment my projects are developed for,
so this wouldn't be of much use to anyone else but it performs a large
amount of cleanup for me). But even without this, you do end up with the
skeletal structure of the original code all in place and with significant
chunks of code that do already work without needing any modification.

Having done that I then exclude all the source files from my project and
re-include them one by one (starting with those that have no dependencies on
the other files), switching Option Strict On in each one and scanning
through the source code line by link to correct any upgrade errors, make any
..NET language/structure improvements, and ensure that every single upgrade
warning is considered. This is of course somewhat time consuming, but
certainly for the complex projects I've been upgrading it's a heck of a lot
faster than rewriting it would have been.

The end results have been very good. A few errors have slipped through but
then I'm sure errors would have been introduced rewriting the projects too.

YMMV of course, but I think that the upgrade wizard does perform a useful
service, even if it doesn't produce anything that is approaching
production-quality code.
 
J

Jay B. Harlow [MVP - Outlook]

Raymond,
If you are going from VB6 to Windows Forms I would second the recommendation
for http://www.vbmigration.com/. They have WPF support planned for later
this year (http://www.vbmigration.com/faq.aspx#wpf)

If you are going from VB6 to ASP.NET be ready to rewrite your entire UI. I
would question this decision and instead suggest converting to any of (in
order of consideration):
- Silverlight 2.0 app (Silverlight 2.0 is currently in beta).
- WPF browser app
- Windows Forms click once app
- WPF click once application

If you have your business & data logic separate (class libraries) from your
UI, then you should be able to use vbmigration partner to migrate those
class libraries.
 

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