Solved

How to convert VB6 to VB2010

Posted on 2010-09-03
39
6,115 Views
Last Modified: 2012-05-10
We are still in the process of getting a grip of vb2010.

Is there a tool to convert VB6 to VB2010?

Also, based on EE experience, whats the best method of going thru the conversion?
0
Comment
Question by:rayluvs
  • 13
  • 12
  • 5
  • +5
39 Comments
 
LVL 8

Accepted Solution

by:
Mohit Vijay earned 167 total points
ID: 33601760
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 278 total points
ID: 33601791
how big are your vb6 projects?. this is free for 10k lines or so ArtinSoft’s Visual Basic Upgrade Companion
  http://msdn.microsoft.com/en-us/vbasic/ff793478.aspx
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33601794
fyi - free ebook on migrating titled  Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET
 http://msdn.microsoft.com/en-us/vbasic/ms788236.aspx
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33601796
Remember, it might be possible that when your convert your code into .net, there are certain chance that you will get some errors related to namespace/library etc... that you need to fix by adding references and little bit manual code changes.
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 33601826
Complete re-write from scratch IMHO :(
0
 
LVL 5

Expert Comment

by:BrianVSoft
ID: 33603110
If your VB6 code is complex - then Egl1044 is correct.
Its always worth a try to convert to 2008 and see how many thousand errors (To Dos) you get.. Try fixing a few to get an estimate of how long it will all take.. Microsoft staff have stated that a million lines of code may take two years to convert. (and many experts will state "You should just stick with VB6")
There are 'class actions' pending to require microsoft to 'fix' or address this incompatibility problem.
0
 

Author Comment

by:rayluvs
ID: 33603475
VjSoft,

              I have to download and install 2008?

rockiroads

              the size of projects are not big, the largest is around 6000 lines and around 2 or
              3 mb in size.  The rest of the apps are smaller.  If we sum up all apps in lines,
              it's less 15,000 lines

                also, all components ans references used are Microsoft

               The apps are not complex, they are all related to invoices, inventory, financial


egl1044,

               Rewrite is an option, but seeing all my VB6 apps for the Dept we want to
              to migrate is not large, we wanted EE guidance in the conversation.

               Also, whats IMHO ?
0
 
LVL 8

Assisted Solution

by:Mohit Vijay
Mohit Vijay earned 167 total points
ID: 33603507
convert your code from VB6 to 2008 and it after some minor corrections, you will be able to use it in 2008 and using it in 2010, will not be a big deal for you.
0
 

Author Comment

by:rayluvs
ID: 33603533
Ok... I have 2010 installed now; do I have to install 2008? what do I need for the conversion?
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33603587
ok, give vbuc a go and maybe look at the ebooks on what to do and look out for when upgrading
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 33603596
The code conversion isn't very good on the surface I have a feeling you might be expecting to convert easily but this won't happen. You might spend most of your time fixing errors that the conversion can't understand. It could help you with some basic conversions but it really doesn't make it pure .NET such as classes that can be used in .NET that in VB6 you have tons of modules using API for the same purposes. You can use EE as guidance there is plenty of EE experts that can help you convert directly by asking how to convert a block of code to .NET if you run into trouble.
<< Also, whats IMHO ? >>
In my honest opinion :)
0
 
LVL 12

Expert Comment

by:Mohamed Abowarda
ID: 33603809
It depends on the code itself, if it's simple, you will need to copy and paste your code from VB6 to VB.NET environment and do some changes, ex: changing from "Type" to "Structure", etc...

You may also use a code conversation tool, take a look here:
http://www.vbdotnetheaven.com/uploadfile/psingh/convertvbform04222005063734am/convertvbform.aspx
0
 

Author Comment

by:rayluvs
ID: 33604341
I have read all the links and are super informative.

rockiroads:

         We have gone thru the link provided and there is no way to download the free VBUC
         (ArtinSoft’s Visual Basic Upgrade Companion VBUC)
         How can we download the free version?

Also, I have vb2010, if I need to convert with VB, do I have to download VB2008 and install? or the vb2008 converter is a different software?
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 278 total points
ID: 33604422
from the link there is a link that takes you to the website https://www.artinsoft.com/checkout/vbucee-versions.aspx?pc=msdn the promocode is msdn. I clicked it and it says to me  Your Total = $0.00
Looks like you still have to enter your details though. if u dont want to do that, try this trial request page http://www.artinsoft.com/contact-vbucee-trial.aspx
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33604428
vbuc does not mention visual studio version so might be worth just trying it out, looking at their website or asking artinsoft
0
 

Author Comment

by:rayluvs
ID: 33604649
i see... it's the trial version... ok
0
 

Author Comment

by:rayluvs
ID: 33604653
What about the vb2008 question:

   i have vb2010, if I need to convert with VB, do I have to download VB2008 and install?
   or the vb2008 converter is a different software?
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 278 total points
ID: 33606735
Checking the info on 2010 - (I have 2010 and am unable to migrate any of my old vb6 projects),
Visual Studio 2010 does not provide tools for upgrading applications and projects from Visual Basic 6.0. If you want to upgrade your project from Visual Basic 6.0 to Visual Basic 2010, you can use the upgrade tools provided with earlier versions of Visual Studio and then upgrade the project again in Visual Studio 2010.

VjSoft originally said to convert to vb2008. I think without using any 3rd party tools, this is what you will need to do.
Do u have a msdn subscription? if so then you may be able to get vb2008 free. if not there is the express edition that you can download (vb2008 express should suffice). vb2008 express edition is a web download (not full file download) and if u cant find it on ms website try a site like this http://www.brothersoft.com/visual-basic-2008-express-edition-67707.html

1. do some prechecks (see later on)
2. upgrade your project using vb2008
3. fix all issues
4. test
5. now you have a saved working vb2008 version, load up visual studio 2010
6. upgrade vb2008 project to vb2010

prechecks
I found this assessment tool http://www.microsoft.com/downloads/details.aspx?FamilyId=10C491A2-FC67-4509-BC10-60C5C039A272&displaylang=en which analyzes your vb6 project and reports possible issues. It was for older version of vb.net but should still suffice

ms also have a guide on the upgrade process http://www.microsoft.com/downloads/details.aspx?FamilyId=7C3FE0A9-CBED-485F-BFD5-847FB68F785D&displaylang=en

I think its best if you modify your vb6 projects to make the upgrade as painless as possible. this would include things like identifying and removing redundant projects and code, sorting out third party controls, tidy up code to ensure no use of things like variants and always ensure variables have been defined properly. When you run the assessment tool, it will give you an idea of what is needed.

This might be a cycle initially of keep changing vb6 but hopefully with the issues you find you can sort out your other vb6 projects before they hit the upgrade path.


Further reading
Interesting article on upgrading here http://www.codeguru.com/csharp/.net/net_asp/miscellaneous/article.php/c6975
msdn info http://msdn.microsoft.com/en-us/vbasic/ms788233.aspx
msdn blog http://blogs.msdn.com/b/ericnel/archive/2008/04/25/visual-basic-6-migration-to-net.aspx

0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33606740
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:rayluvs
ID: 33606912
Thanx for the useful info...

I did download vbuc and run it, it seems pretty straightforward.  It reported some errors, but that will another issue.

I'll followup on your links.

One last question prior closing the question:  

   Whats the differences between vbuc and the process of upgrading via vb2008?

0
 
LVL 8

Assisted Solution

by:Mohit Vijay
Mohit Vijay earned 167 total points
ID: 33606918
vbuc is a third party tool and not related to microsoft, but conversion through VB2008, is a microsoft's way to convert old versions.
0
 
LVL 15

Assisted Solution

by:fsze88
fsze88 earned 55 total points
ID: 33606930
I would simply call the command line utility VBUpgrade.exe found in %Program Files%\Microsoft Visual Studio 9.0\VB\VBUpgrade and provide the project you wish to upgrade as a parameter.  Then you can take that output and due any post processing you wish.
0
 

Author Comment

by:rayluvs
ID: 33606941
Yeah, I knew that, let me rephrase the question:  

    Based on your EE experience, which converter is the best way to go?

(I just want EE personal opinion on this)
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 278 total points
ID: 33606945
Whats the differences between vbuc and the process of upgrading via vb2008?
    VB2008 is MS's way - simple but more manual work to do
    VBUC is third party, limited free but you got to pay for it. Probably more advanced in that it help report on errors, etc. VBUC is endorsed by MS but that is the only link between the two. VBUC is not in any way associated with MS.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33606952
My personal preference has been to just use visual studio and then tackle the problems but mine has been for my personal development not my company one. The 3rd party tools are there for those who want to try make the upgrade less painful and especially handy for those not so familiar with dotnet (imho).
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33606953
We upgrade out old projects vb6 based into VS2005 and it was perfect, after that whenever new versions came, and client allows us, we convert out projects vs2005 to later version easily, no need to pay extra and everything work perfectly.
0
 

Author Comment

by:rayluvs
ID: 33606974
Understood.  

So I see that both of you seems to point to using MS for the conversion.  Ok, I'll proceed to download the vb2008 and run it thru.

(by the way rockiroads, the assessment tools works like a charm it gave me everything of my vb6 apps)

Thanx all
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33606978
yea that tool is useful for the bigger apps, maybe also for the smaller ones also. glad you got something going. good luck with your migrations.
0
 
LVL 3

Expert Comment

by:Genetic_Wolf
ID: 33612896
sorry to add this, but...

I suggest you allow point to egl1044 because he is right.

full rewrite of code is the less expensive in time. and you'll end up with less buggy application.
conversion tool are only good for very small app.  But if you  have very small app, you would rewrite from scratch anyway.

The only time the conversion tool is good is for someone that doesn't know how to program and he got "this code from a friend" and want to make it work on .NET

I would allow point to egl1044 and assist to: rockiroads for the right reference.

and the comment in the article:
"Interestingly though, Rewrite is a less risky option than it once was"
0
 

Author Comment

by:rayluvs
ID: 33612938
Thanx for the input.  You hit right on the nose.  Our apps has been developed ex-staff that is not now present, and the present developer is not as full-pro on VB, so you are right, tools is the way to go.
0
 
LVL 3

Expert Comment

by:Genetic_Wolf
ID: 33614198
no pun intended.
what I meant was : convertion tool does a very lousy job and are 95% useless.

Convertion tool is 5% rewrote code 95% debugging and research to make it work
while rewriting is 95% rewrote and 5% debuggin to fix

so that remain your choice for sure.  if that's the work of another one, Can't you work with the current program ?  Would probably easier to patch this program instead of rewriting the whole thing.

Did you thought about RAC (Rent a Coder)?
the new Web Adress is vWorker:  https://www.vworker.com

they would fix your app for a fraction of the time and $$ you would invest in this.
it mostly work like eBay, you post your work and choose a Worker based on his experience and the charge he propose.
if you use RAC (now vWorker) plz note that India got very good programist and they work for penny...  (literally)


0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 278 total points
ID: 33614840
interesting comments genetic_wolf. would you still recommend rewrite if the company had no dot.net skills and are unable to use RAC due to maybe the confidential nature of their software? Also more difficult to maintain any quality controls you have in place. With any situation you look at what you got and options available to you before you decide on the best course of action. The experts here have all given their views on the way forward so good info for Ramante.
The article also later said That said, I would still place Rewrite below Migrate or Reuse for most companies.
Have you used the assessment tool yet? Try it, its is quite useful.
My company has a lot of onshores, and sometimes, just sometimes you get what you pay for, if you catch my drift.

I am not knocking the rewrite nor am I saying migrations is the only way forward, what I am saying is look at the options and pick the one you think best.
0
 

Author Comment

by:rayluvs
ID: 33617849
rockiroads, good point!

I just printed this question for a meeting I have with other colleagues that are going thru the same situation and thier staff are not pro on .NET (I have been pushing them to jump on the EE wagon and sign on, you guys are great!).

At this point we'll proceed to close the question

Again, Thanx All!

0
 

Author Closing Comment

by:rayluvs
ID: 33622375
You guys are excellent!  I hope I had more points to award!
0
 
LVL 3

Expert Comment

by:Genetic_Wolf
ID: 33648083
rockiroads:

didn't' intend to start an issue here.
the assessment tools was indeed a good product.  However, it was intended to be used with the first .NET version.  Wich was a disaster.   That being said, MS did partly fix the subsequent version of .NET, but assessment tools didn't took thoses change into account.

as for your comment about:
<<That said, I would still place Rewrite below Migrate or Reuse for most companies.

if we look at the graphic and read the whole comment,  the author mean to prioritize rewriting.
since "below" on the graphic mean BEFORE.  and the whole paragraph was talking about Migrate and reuse.

RAC also has option to No disclosure agreement before handling over any job.

as for our issue here, I however incline below your experience.  I meant no disrespect.

the user asked a question and further stated he had not much experience into programming.
Converting a program from Vb to .NET is already a hard task most of time.  Imagine doing that on a program you didn't created yourself.  Like you mention, if it's small...  could be done.  Otherwise, I would recommend rewriting or asking someone to rewrite.  The decision depend on how much time the user is willing to waste in the long run.  The solution "could" work for now and for a few month... then he will need to "add" more function to his program and then will realize the current structure of the program was not meant to do that in .NET and would require full rewrite because that's what happen to most of Vb program converted to .NET

one question that was asked but not answered by the user is "why do you need to convert to .NET ?"
It is still not mandatory for most program and delaying that part could alllow the user to make a complete map of what he want from his program and a full documentation on the subject could allow a good programist to rewrote an app that would satisfy mode his needs.
0
 

Author Comment

by:rayluvs
ID: 33648410
Thanx for the info!
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33648870
wasnt meant to start an issue genetic_wolf, was just curious in your statements and you have elaborated, thanks.
0
 
LVL 3

Expert Comment

by:Genetic_Wolf
ID: 33654936
no problem, take care.

Ramante: Wish you good luck with your project, no matter wich hard decision you'll take.
I've been in your situation before and it's certainly not easy.
0
 

Author Comment

by:rayluvs
ID: 33655010
Guys, thanx a lot!  You guys are great!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now