Results 1 to 8 of 8

Thread: Conversion From VB6

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    227

    Conversion From VB6

    Hello everyone. I'm wanting to use a bit of code that someone pointed me to in a VB2010 application, however the code is in VB6. How would I go about converting this from VB6 to VB2010? I've personally never done a conversion of complete code like this, so help would be wonderful!

    Here is the link:

    http://www.vbforums.com/showthread.php?t=449751

  2. #2
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    Re: Conversion From VB6

    VS 2008 comes with an upgrade wizard (just open the .vbp file). This wizard is no longer included as of VS 2010.

    However, this is by no means automatic - you will need to research the pitfalls. Some preparation of the VB6 project is usually recommended and the adjustments required after the wizard finishes are not trivial.
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    227

    Re: Conversion From VB6

    Alright.. is there any kind of tool that will help me convert from VB6 to 2010? Or is there a guide placed somewhere?

  4. #4
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    Re: Conversion From VB6

    VB9 (VS 2008) code will work unchanged in VB10 (VS 2010).
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    227

    Re: Conversion From VB6

    ah okay, so I will need to install VB2008 and run the wizard then?

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,043

    Re: Conversion From VB6

    The wizard will do a bad job at best, unless the code is exceedingly trivial. If you search this forum on that subject, you will find that virtually everybody says the same thing: You are better off re-writing than converting.

    The differences between VB6 and .NET are too great for a conversion tool to do a reasonably good job on all but the simplest code.
    My usual boring signature: Nothing

  7. #7
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,538

    Re: Conversion From VB6

    I tried ... ran into a number of problems... so I searched by the API name and .NET.... found this... it's in C#.. but it should be a LOT easier to convert from C#to VB than to try to upgrade the VB6 code to .NET.

    http://social.msdn.microsoft.com/for...A-5FBE7A46B61A

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    227

    Re: Conversion From VB6

    Thanks for all of your help so far!

    I've had a look at the code, and obviously I need to include the wininet dll. However, for some reason, when I try to make a reference to wininet.dll, it gives me an error saying that it cannot add the reference. Is there maybe an alternative method, or a built in version of InternetSetOption()?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width