Results 1 to 4 of 4

Thread: [RESOLVED] Do i convert and recompile my vb6.0 code to .NET (any version)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    235

    Resolved [RESOLVED] Do i convert and recompile my vb6.0 code to .NET (any version)

    i have a project developed in vb6.0 and, it is working accurately in this environment, i want to open my vb6.0 project in any version of .NET, and i also want to recompile and publish this code by using .NET framework.

    Is it possible, if yes then what is the proper procedure.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Do i convert and recompile my vb6.0 code to .NET (any version)

    Yes and no. If you open a VB6 project in VS.NET it will run the conversion wizard and convert it to VB.NET but there will still be a reasonable amount of work to get it to even compile, never mind run and then work properly. The languages are just too different for any wizard to do any more. Also, the standard of the code produced will be well below what you would hope to write from scratch, so most people agree that the conversion wizard should be avoided for all but small snippets or just a test run to get an idea of what's needed.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Do i convert and recompile my vb6.0 code to .NET (any version)

    Moved to General Developer

    As a long time, old time, VB6 programmer and relatively new .NET programmer (just a little over a year now), my answer is NO - it isn't possible.

    If you need your VB6 project to work in .NET save yourself time and trouble and don't even bother with the conversion wizard. Just rewrite it from scratch. In the long run, it will be much quicker.

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Do i convert and recompile my vb6.0 code to .NET (any version)

    I'd add that an entire project will not convert well, but a single method will convert fairly well. Therefore, if you re-write from scratch, you can copy and paste particular methods across, thereby saving some time. I was able to re-write an existing project into .NET in a tiny fraction of the time it would have taken to do a totally fresh re-write, because I could copy over any method that still applied in the new design. However, since .NET is OO and VB6 is not, the design itself is what will change the most.
    My usual boring signature: Nothing

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