Results 1 to 9 of 9

Thread: Covered, but...Converting VB6 to VBNET

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830

    Covered, but...Converting VB6 to VBNET

    Hello,

    I have a VB6 project that has approximately 40,000 lines of code. What recommendations can you give me about converting this to VB.NET? Eventually this will likely be converted to C#.

    I have heard that the current version of VB.NET does not have control arrays, but that the new version coming out will have control arrays put back in. Will this help in the conversion considering the VB6 project uses them extensively?

    Has anyone developed any new tricks or tips? I have the Visual Basic Code Advisor thing and am looking into that now.

    Thanks!

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    First, if you do a true port of the application, you may be able to cut that 40,000 lines to about 20-30K.

    Nice.

    If you are going to have it on C#, why would you convert it to VB.NET first? That just doesn't make sense.

    If the application is working right now, why not just leave it till 2005 comes out (framework 2.0). There is a bunch more features that will help your coding.

  3. #3
    Member
    Join Date
    Sep 2002
    Location
    Cincinnati, OH
    Posts
    44
    Based on my experience with large vb6 to vb.net apps your almost better off building from the ground up, however, there are those exceptions. My suggestion would be to try the built in .net conversion utility and see how it interprets your code.

    If you are planning on waiting for the newest version of .net, inside sources tell me it isn't going to be released as planned which shouldn't suprise anyone.

    Jim Webster - MCSD, MCSE
    Jim Webster

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830
    <<If you are going to have it on C#, why would you convert it to VB.NET first? That just doesn't make sense.>>

    The "powers that be" feel it will be easier to convert VB6 to VB.NET and then later on convert the VB.NET to C#. From what I have read and heard, you just about have to re-write your application so converting from VB6 to C# makes sense, but if there is an "easier" way to convert to .NET from VB6 then that is the way to go for now.

    When is 2005 coming out? What month? Is there a pre-release I could experiment with and how would I get it?

    Tell me more about this "true port of the application" thing.

    Thanks!

  5. #5
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    I think 2005 was suspose to come out the last quarter of 2004

    What does your app do?

    If you use lots of API that cannot be replaced by methods in the .NET framework it may cause problems because some API calls are a pain in the ass.

    If possible, could we look at the project?
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  6. #6
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    Originally posted by jwebster03
    Based on my experience with large vb6 to vb.net apps your almost better off building from the ground up, however, there are those exceptions. My suggestion would be to try the built in .net conversion utility and see how it interprets your code.

    If you are planning on waiting for the newest version of .net, inside sources tell me it isn't going to be released as planned which shouldn't suprise anyone.

    Jim Webster - MCSD, MCSE
    The conversion utility is a sad disappointment at best, a delusion at worst. First, it does not use anything that could be considered .NET specific. eg. It wraps ado objects and makes them work in your .NET application, not very useful if you are trying to port your application to ADO.NET. Additionally, it takes your activex components and wraps them to work in your ".NET" project. From the examples I've attempted (and observed others attempt) I would say that using it is a complete waste of time if you actually want a genuine .NET project.

    The only benefit I've seen from a conversion is that it does teach you a lot (probably more than you would ever really want to know) about COM interop.
    Whadayamean it doesn't work....
    It works fine on my machine!

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2003
    Posts
    830
    The 2005 Beta is out now. Non-subscribers can order a cd.

    http://lab.msdn.microsoft.com/vs2005/

    They also have some interesting "Express" versions. I wonder if these Betas Expire. What do you think?

  8. #8
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    if its like the beta for office 2003, no... but a microsoft beta is a bug waiting to distroy every file on your hard drive
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  9. #9
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    All beta's have an expration date I believe. The express versions are language specific, eg. VB.NET or C#.NET, but do not include all functionality for all languages. I would spend the few $$ and order the cd for the full version if you really want to get your head around it.
    Whadayamean it doesn't work....
    It works fine on my machine!

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