PDA

View Full Version : Converting VB6 scripts to modern times..



adslgeek
19-06-2012, 11:38 PM
I have some old code in VB6 and was thinking of bringing it into the modern age..

Is there anyway to compile the old script so it works on Win 7 or 64bit systems?

Or
What is the simplest method to convert them?

mikebartnz
20-06-2012, 12:20 AM
Don't re-invent the wheel just bite the bullet and use C or C++.

adslgeek
21-06-2012, 10:12 PM
Do you mean just rewrite it all? I was sort of resigned to that :-)

Fifthdawn
21-06-2012, 10:47 PM
It would be a lot easier to port VB6 to VB.net or C# than C or C++ I think.

mikebartnz
22-06-2012, 12:35 AM
It would be a lot easier to port VB6 to VB.net or C# than C or C++ I think.
It is basically going to be a rewrite anyway so it might as well be done in a far better language that can also target more than one OS. A very good learning curve too.

adslgeek
24-06-2012, 09:13 AM
Thanks mate, I have been stuck on Perl, PHP and starting python so maybe time for a new one! :)

stratex5
24-06-2012, 09:23 AM
Vb.net is quite similar to vb6. You could almost theoretically copy and paste the code and with a few adjustments it should work. Also vb.net is alot more feature full but as other people have said, C#, C and C++ are more real world languages that are universal.

adslgeek
24-06-2012, 09:32 AM
It might be a good lazy idea for me to port to VB.net then and then learn another language another day :-)

stratex5
24-06-2012, 09:38 AM
Just note that you might have to look in to a few stuff with vb.net as some commands can be different. What sort of apps do you me?

Webbnzl
24-06-2012, 10:31 AM
I'm pretty sure that Visual Studio has a VB6 import function which should help you through the process and highlight parts of the code that needs to be adjusted to meet the current standard.

Digby
24-06-2012, 12:05 PM
I used to love .Bat files

stratex5
24-06-2012, 02:04 PM
I used to love .Bat files

???

adslgeek
25-06-2012, 08:14 PM
Just note that you might have to look in to a few stuff with vb.net as some commands can be different. What sort of apps do you me?

Do you me? ;-)

This was just the troubleshooter tool (it's actually a bunch of VBS scripts that I hacked into a VB program, then realised it won't work for Vista or 64bit).

http://www.adslgeek.com/dslforum/index.php?topic=2026.0

stratex5
25-06-2012, 08:32 PM
:D

Yes, vb.net works with 64bit im pretty sure. If you need help with some of the code i might be able to find some time to check some of the debugging errors. Do you have an un-compiled version of the tool which i might be able to try converting for you?