Solved

MS VB 6.0 compile

Posted on 2013-05-10
8
346 Views
Last Modified: 2013-05-10
I have an old VB 6.0 Code and its not compiling now I am trying on VS 2005 and 2006. What Steps should I take to compile it, also is there any tutorial on VB 6.0 so that I can learn in depth. BTW I am a .Net Developer and I have been working on C#.
0
Comment
Question by:skbhagat35
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39155744
.NET is completely different (in terms of the compiled output) than VB6. You need to acquire a VB6 compiler, which is probably going to be a challenging task. You can try searching MSDN (if you have a subscription). Otherwise you can try auction sites or the like.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 39155769
Visual Studio .Net (version 2002 and later) cannot compile VB6 code.

If your project is trivial (really not complex) you may try the converter to bring to .Net but I never had really interesting results with it.
0
 

Author Comment

by:skbhagat35
ID: 39155802
Thanks guys, I know its outdated and nobody uses it today so what would be the best solution to VB6 codes I tried converting to my VS 2010 but it didn't convert, so I can only think re-write on VB.Net, any better suggestion on this, thanks
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 39155822
if you already tried the converter with no great success, you have 3 options:
-1 = re-write
-2 = keep it as is (find a VB6 compiler to recompile it)
-3 = give a try to http://www.artinsoft.com/
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39155832
Many of the VB6 functions have been carried over into .NET, so a rewrite may not be completely terrible. However, depending on what your VB6 code is doing, it is probable that some of the code will not convert, and you will need to look for a .NET equivalent in such cases.
0
 

Author Closing Comment

by:skbhagat35
ID: 39155875
This solution seems to be helpful
0
 
LVL 16

Expert Comment

by:HooKooDooKu
ID: 39155886
If you're going to rewrite it, I don't see the point in rewriting it in VB.Net.  VB6 and VB.Net are two totally different languages (hence the reason you can't compile it in VS 2010).  It's called VB.Net because it shares some of the same basic syntax.  

As an example, in VB6, when you declare an array, you are declaring what is the largest index.  So an Array(10) has eleven elements: Array(0) to Array(10).  But in VB.Net, Arrays are now "C" like... in that you declare the number of elements.  So an Array(10) had ten elements: Array(0) to Array(9).

In other cases, entire functionallity of the language was removed... such as the ability to have control arrays.

So if you're going to rewrite it, rewrite it in a language you're experienced in ... C#.


But first, I would try to go around to colleages that have been around for a while and see if you can find someone that still has a copy of the Visual Studio 6.0 disks you could use to try to install Visual Studio 6.0. (Visual Studio went from sequential number to years when they went to .Net dropping Visual Basic.)  However, you will likely need either an XP machine or and XP Virtual Machine (such as is available with the upper tier versions of Windows 7) to install it on.
0
 

Author Comment

by:skbhagat35
ID: 39156078
Thanks, I did find the machine which has VS 6.0 but when i go into the VB part I get lost it comes out with form and other stuff, like winforms in VS2008 or later, as I have not worked with VB6 at all, I don't know how to play around it. so any suggestion regarding this will be helpful.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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