VB6 to VB.NET Comparison
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 76

Thread: VB6 to VB.NET Comparison

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    16

    VB6 to VB.NET Comparison

    I posted a thread awhile ago about me using vb6 and explained I was new to programming. Someone told me that if I was new I should just jump to vb.net. I believe I explained my job uses vb6 and wants me to learn it. Personally though I would like to learn programming for myself. After taking the advice to move on to vb.net I went in search of a good book. Something I could take with me places to reference back to. Anyway I found one and it will be delivered soon

    Programming itself makes me very excited I can't wait to get my book and learn! Like I said I am just a beginner but knowing something that not EVERYONE knows or even looks at makes me feel good personally and all of you who are already experienced programmers or even the not so experienced should feel the same. It is amazing what you can do by "simplest terms" typing to a computer.

    After sharing my opinion like I said I am very excited to jump on vb.net and hope that the person who gave me that advice knows I took it.

    I was wondering if someone could please post a comparison code for me to kind of get a feel for vb.net. What I mean is make a code that does something in vb.net and then show me the code that it takes to get that same thing done in vb6. I know there is not gonna be a length difference or anything I just know the languages are suppose to be different and I just wanted to see an example if someone could

  2. #2
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    12,097

    Re: VB6 to VB.NET Comparison

    Congratulations

    A code sample like you asked for is not really meaningful. It is the entire philosophy that is different. The syntax for many (most) things is nearly identical.

    Since you are just starting out, you don't have an existing "mindset" that needs to be broken.

    On the otherhand, when I train people in .NET development, I will almost invariably:

    1) Teach VB6 developers in C#
    2) Teach C++ developers in VB.NET

    This minimizes the students attempting to apply old approaches (which are comfortable) to the new environment.

    Only once they are comfortable with the architecture of a good .NET application, the last class (or two) will actually bring the VB6 people back to VB.NET and the C++ people back to C#....
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009
    In theory, there is no difference between theory and paractice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,537

    Re: VB6 to VB.NET Comparison

    Difficult to give an example as there is much which seems to be nearly the same and lots of new stuff which isn't there in VB 6.0
    For example in VB6.0 there as no real multithreading possible in vb.net you easily can do this. For example loading data from a database using a backgroundworker thread. there was nothing compareable in VB 6.0

    But eementar coding like if... then ... else , loops and others han't changed.
    You can download and use VS 2005 or VS 2008 express as a free version for working with VB.net. No problem if you are using XP or Vista as an OS. But the old VB 6.0 you will run into lots of troubles trying to use it on Vista. I have heard it can be done in any way, but I never have found a real working solution to use old VB 6.0 on my Vista PC.
    This all are good reasons to forget thinking about VB 6.0 if you are new to programming.
    Or would you try to use a penny farthing (bicycle) if you want to learn riding a bicycle ? ( yes maybe if you want to work in a circus, or if you will need it for carneval )
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  4. #4
    Join Date
    Nov 2008
    Posts
    16

    Re: VB6 to VB.NET Comparison

    thanks to both of you for explaining that there are some similarities in syntax...i've been a vb6 beginners book for some time and breaking my head with it. Then i joined the forum and heard it was old...i felt like i waisted my time reading it 2 begin with but since ur telling me its similar that helps some because reading 500 pages off a 700pg book sucked! lol I am not a big reader and its hard for me to pick up a book so the thought of reading for basically nothing was running threw my head.

    I guess I understand a little more now...the capabilities of vb.net are greater and overlap vb6 which makes vb.net require knowledge in more things Or expect you to know that doing something in vb6 has a different outcome in vb.net.

    I needed to know vba for work but I am wondering now if vb.net would solve my problems. Basically i only needed vba for mircrosoft access and needed it to further customize my forms.

    Would i just be able to go around learning vba and build a program which would update my access database?

    I work for a company which uses access and their forms to manage files. Those files are pdf's which each have to be edited and orgainzed. We have to organize the files in the database and open up the pdf to edit. My boss has made it possible to use a form in access which will organize the files however the user would like and when double clicked would open up the pdf within the access form.

    Would that be possible to duplicate with a vb.net program? Something that would allow me to edit pdfs within the form and have drop down menus of records in a access database? I just wonder if it is possible to use vb.net for access without having to learn vba.

  5. #5
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,537

    Re: VB6 to VB.NET Comparison

    Quote Originally Posted by BadNews01 View Post
    ...

    Would that be possible to duplicate with a vb.net program? Something that would allow me to edit pdfs within the form and have drop down menus of records in a access database? I just wonder if it is possible to use vb.net for access without having to learn vba.
    You need to use VBA if you are working inside Access. This is a bit different to VB 6.0 and also different to VB.net
    If you already work on existing Access Databases which already have forms added then you will need to learn and use VBA. Stop.
    If you have an Access database and no Forms inside and you just are beginning to do some Forms for using the database, then and only then I would do a separate application which connects to the access database and doing all you want to do using VB.net
    But in all cases a) I would talk with my cjief about what he prefers
    b) To learn soething is never a loss. Talking one language yu will much easier learn the next one and the next one..
    During my life I learned: Fortran, Basic, C ( before windows ) C++
    VBA Access, VBA Word, ( which in the beginning 90th was quite dfferent to VB too , VB5.0 -> VB6.0 , C# ... ASP.net
    We will see what the future brings
    But as I already told you, learning ih reading and doing. More of doing examples then time is needed for reading !!
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  6. #6
    Join Date
    Nov 2008
    Posts
    16

    Re: VB6 to VB.NET Comparison

    Yes that is what i was asking I don't really NEED to work within access. I was just wondering if it was possible to connect a vb.net application to a access database to work out of it. Personally I hate how Access adds to my toolbar with everything I open in it. My company uses access to orgainze projects we work on. Every project we do comes with 15,000+ files depending on its size. We organize it within access so my boss makes custom forms in a access database to help this process. There are several steps the files have to go threw before the project is considered complete and for every step he usually makes a quick form using existing tables as sources for the objects he uses. Usually the forms display valuable information when...lets say a file is selected in a listbox.

    We don't have actual forms or databases we use everything is custom made when new tasks are given. All we do is copy tables from a existing database that we need and make forms to work on them. I believe you are telling me working on databases is possible with vb.net and I hope it is.

    My personal goal is to be able to duplicate what my boss does. He informed me that he's been doing this method for 4 years learning by reading and experience. He is a type though that sticks to things he knows works. He is also very stubborn. Once he has a opinion on something he sticks to it. Thats why I was just wondering if there was possibly another way.

    Thank you personally for telling me learning something is never a loss. My goal in life is to be able to do something great with programming or learn enough to be able to freelance. I have to be honest though that my goal seems unreachable with all these sub forms of different languages. I know that knowing ALL languages is not nesscary lol but knowing that languages upgrade and upgrade and that some even die is what makes me nervous about continuing to want to do this. You like other people tell me that they know different languages.

    I am a normal person I do not consider myself smart at all to be honest. I am glad your telling me that learning a language helps to learn another but do you believe it is possible to know several languages? You say you do but I personally can't see myself jumping from language to language and actually KNOW what I am doing. lol I feel like there would be lots of confusion wanting to use code and methods from a different language

  7. #7
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    12,097

    Re: VB6 to VB.NET Comparison

    You can definately connect to an Access file (.mdb) with .NET.

    However, with the availability of both the Compact and Express versions of SQL Server there are many fewer reasons to do so than there were even a few short years ago.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009
    In theory, there is no difference between theory and paractice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  8. #8
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,853

    Re: VB6 to VB.NET Comparison

    I love this comment !

    He is a type though that sticks to things he knows works. He is also very stubborn. Once he has a opinion on something he sticks to it.
    You also add

    Thats why I was just wondering if there was possibly another way.
    This is really advanced thinking - Something is working well and therefore it needs to be redeveloped in a language you know nothing about.


    This reminds me of ........


    Back around 2001 Microsoft released .Net 1.1 - the whole programming world was celebrating the wonders of this new platform

    Many companies embraced the platform for major new ERP projects so they could replace their old fashioned VB6 technology

    Today, I know of several of these companies which either

    a) Went bankrupt
    b) Will go bankrupt
    c) Are in 2008 still trying to complete the project !!!! - Have not released even a Beta
    d) Have completed their project but users complain that it is Unreliable and far Too slow (Slow even with dual Xeon 3.00GHZ with 8GB Ram)

    We are not talking about a bit of code to solve a couple of problems - we are talking ERP with many hundreds of Forms and Perhaps 1000 or so reports

    Personally, back in 2001 I viewed it all suspiciously

    I am like your boss

    If something works well - why fix it ?

    You see, Microsoft didn't get it right straight away

    So .Net 1.1 became .Net 2.0 became 3.5 and is about to go to .Net 4.0

    And Visual Studio 2001 - 2005 - 2008 - 2010 ?

    What was written in 2001 does not just work in 2008
    Even the upgrade wizard that pops up when trying to open a previous version files has NEVER WORKED FOR ME (except in the most simple of cases)

    And thats Microsoft trying to convert their own languages

    AND ...

    The promise of Web Services to answer all the maidens's prayers for Internet connectiveity and speed have failed dismally (especially the speed)


    And what about the wonders of plugins in .Net ?

    These have cause some optimistic system designers to create systems which, yes, may be modifiable because they are based on plugin concepts, but they are a JOKE (BIG BIG JOKE) to operate as they take forever to load screens and process data

    The user experience is SUICIDAL


    But all this comes at the cost of LEARNING WHAT .NET can do

    LEARNING TAKES BIG TIME

    The advice given to you to follow the .Net path is probably OK in 2008 but I would suspect that the same people giving you that advice today, would have given you the same advice back in 2001-2

    In the meantime, people like your boss, and myself, have been able to deliver working solutions while the rest of the world was scratching its head and muttering "nice" things about Microsoft

    Jump into .Net by all means, but if you have never programmed at all before get ready for the most complicated collection of syntax and rules you can ever imagine - life should get easier and less complicated - Microsoft have succeeded in adding a complexity to the factor of 10 times in creating .Net

    (But there are lots of programmers - excellent programmers - who love it)

    Now you just have to ask yourself - "Do you feel lucky, punk ?"

    "Are you an excellent programmer ?"

    (I'm not - I'M STILL WAITING FOR IT TO ALL SETTLE DOWN)

    THERE HAS TO BE A MUCH EASIER WAY !!!

    But jump into .Net (boots and all) and rest assured that when you post in CodeGuru, there are many dedicated helpers who will give you a serious hand in solving your problems along the way !
    Last edited by George1111; November 9th, 2008 at 08:18 PM.

  9. #9
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    12,097

    Re: VB6 to VB.NET Comparison

    George1111,

    As a professional developer, I have to strongly disagree with most of your post.

    Of the 25+ enterprise level projects (in the 1-3 million lines of code range) that I have been directly involved with, over 90% saw immediate benefits moving to the .NET platform. And this experience correlates well with the experiences of other people (also professional developers) that I know.

    The ones that ran into trouble invariably attempted to keep "old ideas" and not embrace a new design methodology.

    The fact is that developing a .Net solution requires as big (and possibly bigger) mental paradigm (mindset) change as the switch from "structured" programming to "object-oriented" programming required.

    This change encompasses everything down to what items should be memver variables of a class, and what should be dynamically created or passed as parameters.

    Even today, I see people making critical mistakes at the very initial phases of architecture and implementation.

    As far as "what has happened to companies", I have not seen any documentation that shows a statistical difference in the number of profitable companies vs. bankruptcies (or even decreased earnings) that has been attirbutd to .NET.

    (And yes, I have been running my own firm since 1984. OVer the past 5 years approximately 80% of my income derives from .NET solutions. My "bug rates" have decreased by 40%, and my average development budget (even with inflation) is down by more than 1/3 specifically because of this change in technology.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009
    In theory, there is no difference between theory and paractice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  10. #10
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,853

    Re: VB6 to VB.NET Comparison

    Exactly my point

    There ARE a FEW excellent programmers, like yourself CPUWizard, who have done the hard yards of Assemblers through Cobols and so on. perhaps you even went to University and Studied computing - or even Taught Computing

    You are geared mentally to do it - you have done your apprenticeship - you have earned the stripes of mental anguish becoming what you have become - you paid the price of YEARS of dedication

    .Net is clearly something that Microsoft itself considers a work in progress - they are evolving the platform at a great rate, because they are realising that what they have done before "IS JUST NOT GOOD ENOUGH"

    eg, Database Access has taken several major turns along the way

    You have been developing .Net projects in NOT QUITE GOOD ENOUGH technology (but you made it work because you are a professional)

    Imagine the difficulites of all the newbees who did not have such an apprenticeship as yourself.

    They just go bankrupt. They fail. They just wonder.

    You may be a "professional programmer" and that is the problem with .net

    UNLESS YOU ARE A "professional programmer" THERE IS A HIGH POSSIBILITY YOU JUST MAY MESS THINGS UP

    But then again, you can mess things up in any language, can't you ?


    My biggest disappointment with .Net was and still is the IDE help.


    You need to look outside the IDE for help ( this is one place that VB6 just kills .Net - the HELP Department)

    As I said - CodeGuru is here to HELP (thank God!)

  11. #11
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    12,097

    Re: VB6 to VB.NET Comparison

    Thanks for the kind words.

    (Actually my university backgound was physics...)

    It is NOT the "newbies" that I have seen have problems with .NET.

    Like most other changes in technologies (and I did start with punch cards and paper tape) it is the people who hold on to old ideas that have the most problems.

    I count 5 major occurances in my 36+ years of programming that I had to "unlearn" and break habits.

    EVERYTHING is evolving. Consider that until V7.0 of C++, it was NOT even close to being compliant with the standard.

    On the .NET side, yes, the IDE has "lagged" (take a look at the CTP for VS-2010!!!!!) but the alternatives would have been worse. Imagine having the best IDE in the world, that produced unusable programs (regardless of the skill of the developer)....
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009
    In theory, there is no difference between theory and paractice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  12. #12
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,537

    Re: VB6 to VB.NET Comparison

    Quote Originally Posted by George1111 View Post
    There ARE a FEW excellent programmers, ...
    No Geoge. There are lots of new programmers who never have learned the older stuff like I did. They came from univerities or other schools and they work with modern languages. There is no problem to go banrupt by this point,

    .Net is clearly something that Microsoft itself considers a work in progress - they are evolving the platform at a great rate, because they are realising that what they have done before "IS JUST NOT GOOD ENOUGH"
    Hey George come on, your sight of things...

    You cannot stop progress in the world. You cannot go and say Edison has told people that a candlelight is bad and people needs to use electric light now. You cannot .. never .. turn the wheel backwards.

    Development goes forward and forward and only people who tries to stay on a point will succumb while others, able to learn and adapt their knowledge will succeed

    Thats nearly all about and thats how life generally works. And sorry, life isn't developed by Bill Gates you cannot make him guilty for that.

    If MS wouldn't have gone into this direction others liek the Sun people would have done and MS would have gone down the river IMHO

    You have been developing .Net projects in NOT QUITE GOOD ENOUGH technology (but you made it work because you are a professional)
    Hahaha... Strange comment. Have you ever seen one of Wizzards programs .. ( I dont believe that ) But generally said I have never seen a program without bugs as this is impossible by the laws of nature. If the amount of codelines increases the mathematical risc of having a bug increases (see probability calculations )
    Imagine the difficulites of all the newbees who did not have such an apprenticeship as yourself. They just go bankrupt. They fail. They just wonder
    Newbees needs at first to go to school, sorry true. They wouldn't even learn VB 6.0 anymore in school.
    They all will teach them net languages now. But maybe some of them fail because they forget to learn all the basics behind any language.
    Last edited by JonnyPoet; November 11th, 2008 at 04:52 AM.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  13. #13
    Join Date
    Nov 2008
    Posts
    16

    Re: VB6 to VB.NET Comparison

    @George1111:

    I know you don't take your opinion by heart too much. So I just want to make this is clear that I am just using an example and though its its a drastic difference. It is what it is and its an example. You said to basically be suspicious about change. Cassette taps don't scratch. You can drop them, slide them on the ground, and they are small and compact. CD's DO scratch you CAN'T do the same you could with a cd that you could with a cassette and cassettes are ok but without getting into this example to deep cd's are better.

    First off I don't want you to take my example insulting. I just want to make that very clear. I appricate everyone who has responded to my posts and feel like everyone is very helpful. I basically just used that example to be funny But in all seriousness I think it seems somewhat relevant. Cassettes have always been dependable but there was change and cds were developed. My opinion is that yes my boss is doing the work and we are doing good but maybe there is a better way. I personally don't know right now but maybe there is.

    Anyway besides that more on topic. I am new so I do not know as much as others as it seems also as much as you do. So I thank you for your advice. I also defantly do not know the problems vb.net has but as you said it there has been several versions. It never seems like anyone can get something right the first time. When something new comes up i personally always think it will be out done.

    Anyway thanks for your opinion i really do appricate it and before when I would answer "yes." to your question of my feeling lucky. I answer "maybe" now lol

  14. #14
    Join Date
    Nov 2008
    Posts
    16

    Re: VB6 to VB.NET Comparison

    lol yah i remember when ipods 1st came out...that was crazy i didn't expect those to kick off...well the mp3 yes but not the ipod...it looked weird and it was white! ***? lol

    though everyone says "vb is the easiest language to learn", it sounds like a broken record at times lol, is it REALLY that easier? I mean like i said before i've ran into problems in understanding it....would someone in for example html look at the language and laugh? I was considering using html. for one it sounds like its well known and a lot of people use it. I've read somewhere before that no one can say one language is THE BEST because they all are used for different purposes. I was just wondering if, since vb for me gets a lil complicated, it would be EXTREMELY difficult to learn another language or are all these just rumors?

    I just want to brace myself for what might come in the future and reassure myself

  15. #15
    Join Date
    Jan 2006
    Location
    Pearl of the orient
    Posts
    303

    Re: VB6 to VB.NET Comparison

    If you are concern with the future then go for .net, no need for verbose explanations and arguments, just common sense dictates it...

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center