Solved

opening VB 6 projects in .NET Studio?

Posted on 2004-10-27
266 Views
Last Modified: 2010-05-02

I have been using  Visual Studio 6 for some time. I want to start using Visual Studio .NET 2003. At first I need to stay productive by using my existing VB 6 knowhow.
So I will want to access VB 6 projects with VB.NET 2003. Moreover, I will be continuing to write VB 6 projects from scratch.

I have heard that there are many differences between VB 6 and VB.NET. I.E. a bit of a learning curve. Is this true? Will I be a bit shocked by VB.NET's interface?
Also, will there be any compatability problems between my old VB 6 project's and the way VB.NET deals with them?

Thanks

C
0
Question by:cakester
    8 Comments
     
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    You can have both VB6 and VB.Net on the same machine with no problems.  They don't interfere with each other in any way.

    >> So I will want to access VB 6 projects with VB.NET 2003.

    You can create a new VB.Net from a VB6 project using the upgrade wizard, but you cannot take projects back and forth between the two development environments.

    >> I have heard that there are many differences between VB 6 and VB.NET. I.E. a bit of a learning curve. Is this true?

    VB.Net is a fully object oriented language bringing it on par with other languages such as Java, C++ or C# (let the flame wars begin...) .  If you are comfortable with true object oriented programming then you won't have a problem, otherwise there may be some "growing pains" as you learn the VB.Net way.

    >>  Will I be a bit shocked by VB.NET's interface?

    The actual IDE isn't all that different from the IDE in VB6.  I will say though that the editor and intellisense abilities in VB.Net have been vastly improved over VB6.

    >> Also, will there be any compatability problems between my old VB 6 project's and the way VB.NET deals with them?

    The main complaints I see from VB6 to VB.Net converts are the lack of the Forms collection, lack of Control Arrays, lack of the AutoRedraw feature in PictureBoxes, and the loss of the Winsock control...but once you learn how to overcome these "deficiencies" using other techniques available to from the language and framework, you will never turn back.

    Having said all that, I don't recommend using the Upgrade Wizard as you are better off recreating VB6 apps from scratch.  You will get valuable experience learning how to do things the proper VB.Net way.  Besides that, the upgrade wizard does things in its "own special way" and results in code you would never see in a pure VB.Net application.

    Regards,

    Idle_Mind
    0
     

    Author Comment

    by:cakester


    Idle_Mind,

    What I meant with regards to using VB 6 projects in VB.NET: can I open VB 6 projects in VB.NET's Interface and use that said interface with all the commands, forms can language that I would be able to use under VB 6 itself? So, I would be working in kind of a VB 6 mode a bit like some Windows apps would work in a WIN16 mode.  I.E. no converting to VB.NET land.
    I understand that I would be restricted to VB 6 commands etc etc?

    What does IDE stand for, in this context?

    >> you are better off recreating VB6 apps from scratch
    Writing any application in a new language, from scratch; that  you don't know, could take a very long time...  Am I missing something here?

    C
    0
     
    LVL 85

    Accepted Solution

    by:
    IDE = Integrated Design Environment (Visual Studio)

    No, you cannot open a VB6 project in the VB.Net in a "VB6 only mode".  You have to convert it to a VB.Net project with the Upgrade Wizard.

    >> Writing any application in a new language, from scratch; that  you don't know, could take a very long time...  Am I missing something here?

    Your right...it may take awile.  The differences between VB6 and VB.Net are pretty significant though, and the code produced by the upgrade wizard often doesn't reflect how things would be done if the app were created from scratch in VB.Net.

    I recommend you create a simple VB.Net app that with basic controls and play with them.  Then proceed to write the app from scratch.  Believe me, the code will be much better and you will learn more.

    If you absolutely need the app in VB.Net now, then use the Upgrade Wizard but I don't see any benefit from it since the app will do the same thing.

    ~IM
    0
     
    LVL 14

    Expert Comment

    by:Shiju Sasidharan
    Hi Idle_Mind
    i am quite surprised and happy with ur comment

    >>You can create a new VB.Net from a VB6 project using the upgrade wizard, but you cannot take projects back and forth between the two development environments.

    Can u pls tell how can we use this Upgrade Wizard?
    is it come along with VB.Net ? or seperate application ?

    regards

    ;-)
    Shiju


    0
     
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    >> Can u pls tell how can we use this Upgrade Wizard?
    is it come along with VB.Net ? or seperate application ?

    The Upgrade Wizard comes with VB.Net.  To start it, simply click on "Open Project" on the Start Page (or File --> Open --> Project from the menu), and then navigate to the VB6 project file (*.vbp) you want to convert.

    The Wizard will automatically start.  The default selections in the wizard should work in most cases.  When the wizard is done, the "Task List" window will have a list of areas in the code that didn't convert properly and will need further "manual conversion" (Not all commands in VB6 have a direct counterpart).  Comments will also be placed directly above lines of code that may have problems after conversion.

    ~IM
    0
     
    LVL 14

    Expert Comment

    by:Shiju Sasidharan
    hi
    Thanks Idle_Mind
    i will try it out the method
    thanks a lot
    >>"manual conversion"
    will it require lots of conversions if the VB project is big ?

    ;-)
    Shiju
    0
     
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    >> will it require lots of conversions if the VB project is big ?

    Sadly, the answer is Yes in most cases.

    Let me know how the conversion goes and if I can help you fix any parts of it.

    ~IM
    0
     

    Author Comment

    by:cakester
    thanks for your help.

    C
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Learn The Basics of Ethical Hacking & Pen Testing

    Computer and network security is one of the fastest growing and most essential industries in technology, meaning companies will pay big bucks for ethical hackers. This is the perfect course to leap into this lucrative career, learning how to use ethical hacking to reveal ...

    There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    913 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now