-
Conversion From VB6
Hello everyone. I'm wanting to use a bit of code that someone pointed me to in a VB2010 application, however the code is in VB6. How would I go about converting this from VB6 to VB2010? I've personally never done a conversion of complete code like this, so help would be wonderful! :D
Here is the link:
http://www.vbforums.com/showthread.php?t=449751
-
Re: Conversion From VB6
VS 2008 comes with an upgrade wizard (just open the .vbp file). This wizard is no longer included as of VS 2010.
However, this is by no means automatic - you will need to research the pitfalls. Some preparation of the VB6 project is usually recommended and the adjustments required after the wizard finishes are not trivial.
-
Re: Conversion From VB6
Alright.. is there any kind of tool that will help me convert from VB6 to 2010? Or is there a guide placed somewhere?
-
Re: Conversion From VB6
VB9 (VS 2008) code will work unchanged in VB10 (VS 2010).
-
Re: Conversion From VB6
ah okay, so I will need to install VB2008 and run the wizard then?
-
Re: Conversion From VB6
The wizard will do a bad job at best, unless the code is exceedingly trivial. If you search this forum on that subject, you will find that virtually everybody says the same thing: You are better off re-writing than converting.
The differences between VB6 and .NET are too great for a conversion tool to do a reasonably good job on all but the simplest code.
-
Re: Conversion From VB6
I tried ... ran into a number of problems... so I searched by the API name and .NET.... found this... it's in C#.. but it should be a LOT easier to convert from C#to VB than to try to upgrade the VB6 code to .NET.
http://social.msdn.microsoft.com/for...A-5FBE7A46B61A
-tg
-
Re: Conversion From VB6
Thanks for all of your help so far!
I've had a look at the code, and obviously I need to include the wininet dll. However, for some reason, when I try to make a reference to wininet.dll, it gives me an error saying that it cannot add the reference. Is there maybe an alternative method, or a built in version of InternetSetOption()?