Vb.Net - Converting VB6 Function

Good Day Experts!

A few month ago I started on a VB.Net conversion from VB6.  I first ran it through the "converter".  Then I spent time converting code to DataTables and DaterReaders.

Problem I have now is that they have a subroutine that was just written in VB6 that I need to get into the VB.Net version.  

Is it possible ot run the conversion on that subroutine that I currently have sitting in my VB.Net program?

Thanks,
jimbo99999
Jimbo99999Asked:
Who is Participating?
 
käµfm³d 👽Commented:
If the converter did not change the code much, it could be the case that the existing VB6 code is compatible with VB.NET. Most (if not all) of the old VB6 functions were ported over to VB.NET for compatibility. Functions such as Mid, InStr, Left, and Right, for example, all are usable within VB.NET.

Can you perhaps share the function itself?
0
 
käµfm³d 👽Commented:
Can you indicate which converter you are using?
0
 
Jimbo99999Author Commented:
I have Visual Studio 2005. I opened that VB6 project and was prompted with the conversion screen.  At the top, it indicates "Visual Basic Upgrade Wizard".
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Jimbo99999Author Commented:
Ok, but it is very long and has 102 errors just from putting it in the VB.Net project.

How do I get it to you here?
0
 
HooKooDooKuCommented:
You can post code files with the "Attach File" paper clip icon that should display below the entry field when you post a comment.

Is the function relatively self-contained, or does it have a bunch of dependencies?  If the subroutine isn't full of dependencies, you could always create a small project that mostly just calls this subroutine.  Then do a conversion to a new VB.Net application.  Go into the VB.Net application and copy-n-paste this one subroutine from one VB.Net application to another.
0
 
Jimbo99999Author Commented:
I ended up just converting the entire VB6 project with the new subroutine.  Then I just took the subroutine from that conversion and put into the version I have been working on.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.