Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Vb.Net - Converting VB6 Function

Posted on 2013-02-04
6
Medium Priority
?
366 Views
Last Modified: 2013-02-07
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
0
Comment
Question by:Jimbo99999
  • 3
  • 2
6 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38852291
Can you indicate which converter you are using?
0
 

Author Comment

by:Jimbo99999
ID: 38852406
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
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1000 total points
ID: 38852415
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Jimbo99999
ID: 38852485
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
 
LVL 16

Assisted Solution

by:HooKooDooKu
HooKooDooKu earned 1000 total points
ID: 38852558
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
 

Author Comment

by:Jimbo99999
ID: 38852601
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

916 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