Solved

MS VB 6.0 compile

Posted on 2013-05-10
8
343 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 69

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
 
LVL 69

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

914 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

19 Experts available now in Live!

Get 1:1 Help Now