Results 1 to 16 of 16

Thread: Best way to learn VB .NET?

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2011
    Posts
    35

    Best way to learn VB .NET?

    I'm a long time (10+ yrs) VB6 programmer. I have many apps installed with customers & have probably written more than 100,000 lines of code. In other words I'm quite comfortable in VB6. However I see the writing on the wall. VB6 is old & development may some day be not possible anymore. I have VB 2012 on an 8.1 system but I feel helpless with it. Nothing about it appears to be like the IDE in Visual Studio 6. Can't even find anything like an IDE. Where to start? Books? Wasn't there a version of VB .Net that had a conversion utility? I recall that it wasn't a very good utility but how else to start converting large programs? I guess I need a kick start :-)

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,394

    Re: Best way to learn VB .NET?

    I think the latest version of VB that can upgrade VB6 is VB2008.
    To learn .Net quickly I'd recommend working through the course at http://www.homeandlearn.co.uk/NET/vbNet.html
    Your classic VB experience will help you more than you're guessing...

  3. #3
    Lively Member StevenM's Avatar
    Join Date
    Mar 2015
    Posts
    73

    Re: Best way to learn VB .NET?

    I also migrated from VB6 to VB.Net using VS 2010. I learned QBasic in the early 90s. Then found VisualBasic 4. Got pretty good at VB6. All of a sudden I was forced to learn VB.Net and am I ever glad it turned out this way! Been coding in VB.Net for a couple months max and just finished my third program. This language is a MAJOR improvement from VB6.

    What I did to get started was watched a half a dozen YouTube videos to learn how to set up a VB.Net project. There are a lot more options in VB.Net that had me freaking out at first. Now the ones I use make sense and the rest have more meaning.

    For coding the biggest difference in the two languages is the use of classes and this stuff:

    Code:
    Imports System.Windows.Forms
    Imports Microsoft.Win32
    Which goes at the very top of the program code.

    Some things will be familiar. Some things will be a mystery. One thing I learned very, very fast was to be leery of code on the Internet. There are piles of code that is being pushed off as VB.Net and is really from VB6. Some of it works. I chose to say goodbye to VB6 and took the time to learn the VB.Net way.

    My experience learning VB.Net taught me this forum is the very best place to get a straight answer from very good people. I also Google a lot and look for very good VB.Net solutions. If I am not satisfied or just stumped the problem gets posted here. Sometimes it may take a day to get a reply. Usually replies to your threads happen pretty fast. It just depends who is here.

    Hope this helps

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,394

    Re: Best way to learn VB .NET?

    When .Net upgrades VB6 code, you'll find a lot of conversion errors that you'll have to work through and resolve.
    It's not the same as upgrading a VB4 project to VB6. There are many differences, and even when it can be upgraded there are often better ways to write it from scratch in VB.Net

  5. #5
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,110

    Re: Best way to learn VB .NET?

    VB 2012 happened to be the worse looking IDE.
    VB 2013 Community returned back to a more pleasant IDE, as I understand it, and being free, the price is right for trying it out.
    We still use VS 2010 pro at work, so I've been sticking with VB 2010 for pretty much everything I do.

    I guess a pertinent question might be what type of programing you did with VB6, e.g. Web oriented, Database development, graphics, etc.
    The way graphic programming is done in VB.Net vs VB6 is quite different and something that took a little while to come around to since graphical programming was one of the things I enjoyed most with VB6.
    I initially learned VB.Net (at least what I know of VB.Net), by being under the gun. I had a large project that needed to be done in a short period of time, and had a number of languages available to choose from (but not VB6). I figured VB.Net would be the lesser learning curve and most productive so dived in, working the project and searching the internet learning how to do things in VB.Net in parallel with actually doing it.
    That project didn't require any graphics, just normal winForm controls, and some background threads to handle various I/O tasks between various devices with different types of Interfaces.

    A few months after that project was done, as I dabbled (mostly complaining) about issues with trying to do graphical programming in VB.Net vs the way VB6 did them, I had a two week break from work around Christmas to New Years, so I decided to finally sit down and do some dedicated reading of whatever tutorials I could find about VB.Net graphics programming to see exactly how things are suppose to be done in the .Net world. I especially like Bob Powell's ( http://bobpowell.net/faqmain.aspx ) site, as his style of programming and tutorials seemed similar to mine and the way I would write about the subjects. By the time I had to go back to work, I had a much better understanding and appreciation of how graphics should be done, and have continued to experiment, test and learn, and now program almost exclusively in VB.Net.

    Good luck with your efforts.

  6. #6
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,623

    Re: Best way to learn VB .NET?

    I have VB 2012 on an 8.1 system but I feel helpless with it. Nothing about it appears to be like the IDE in Visual Studio 6.
    Trust me its not quite as different as it first appears, the visual appearance has moved on a lot since VB6 days which makes it look more different than it is. There are differences but not so big you cant pick them up as you go along.

    The best thing is to get stuck in and try it and when you come across any issues post them here with the code your having a problem with and more than likely you will get help!

    I think the latest version of VB that can upgrade VB6 is VB2008.
    To learn .Net quickly I'd recommend working through the course at http://www.homeandlearn.co.uk/NET/vbNet.html
    Yes i second that, a lot of VB.Net beginners from this site have used HomeAndLearn its a good resource.
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



  7. #7
    Frenzied Member Gruff's Avatar
    Join Date
    Jan 2014
    Location
    Scappoose Oregon USA
    Posts
    1,293

    Re: Best way to learn VB .NET?

    The last thing you want to do is try to convert an old large VB6 program from the get go.

    It is better IMHO to start with small new projects.
    Learn to program in VB.NET.
    Then tackle the conversion issue.

    I did not follow this advice originally and gave up on VB.NET several times.

    After learning the fundamentals of Visual Studio and the language rewriting a VB6 app was much easier.

    I wouldn't bother with the automatic converter. Just my opinion.
    Burn the land and boil the sea
    You can't take the sky from me


    ~T

  8. #8
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,685

    Re: Best way to learn VB .NET?

    I learned VB.Net after leaving VB6 by diving head long into it. It was similar enough that I could write very basic programs with it from the get-go, however, the online MSDN library was by far the greatest help to me. I cannot stress enough how much of an important resource the MSDN library was. I was pretty comfortable with VB.Net inside of 2 months. I never intended to stay but it was just too painful to go back to VB6. VB.Net is not as hard as you might think, especially if you're an experienced VB6 programmer.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  9. #9
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,390

    Re: Best way to learn VB .NET?

    Niya said it perfectly. I also never wanted to stay but it made no sense to go back. It appears you started vb6 when it was already kinda dead. May i ask why did you choose it over VB? The Conversion tools are horrible and don't really work. M$ dropped this in VS 2005?(correct if wrong). There are others out there but are not really efficient.

    You say you are using 8.1, and you write vb6 on this? I only ask as i was never able to get vb6 running on 8.1. For good reason likely.

    wrox.com offer great books.

  10. #10
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,394

    Re: Best way to learn VB .NET?

    Quote Originally Posted by ident View Post
    M$ dropped this in VS 2005?(correct if wrong)
    Ok. Wrong. 2008...

  11. #11
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,390

    Re: Best way to learn VB .NET?

    I should of known. Paul you still using 2008

  12. #12

    Thread Starter
    Member
    Join Date
    Mar 2011
    Posts
    35

    Re: Best way to learn VB .NET?

    Thanks everyone for your very helpful replies. In response to some questions, I guess I've been doing VB6 a little longer than 10 years, ident. I think I started VB6 around 2001. It was provided by my employer so the price was right. Passel, my programming is rather varied. Lately I've been developing real-time UPS (Uninterruptible Power Supply systems) monitoring programs for APC UPS systems with a little database thrown in. A large part of my work in the last few years is monitoring systems for airport body scanners (heavy graphics & networking) and Facial Recognition. I also use VB6 in my hot rod engine work. I started out programming many years ago in assembly which was great fun. I miss it. I moved on to Fortran, Cobol, Algol, Pascal, C, etc. I once took a week long class in Ada & still couldn't do a "Hello world" program. So far, that's where I'm at with VB 2012. No, Gruff, I'm not gonna try to convert my large VB6 programs right away but eventually I will. At least I'm the author of all that VB6 code so I should understand it. <grin> Have you ever gone back to look at code you wrote some time in the past and marveled at just how smart you temporarily were? </grin>

    ident, I'm developing VB6 on a Windows 7 machine using Windows XP Mode and also an old XP machine. I read somewhere that if VB6 is installed as Administrator, it will work on 8.1. Haven't had time to try it yet. I have been able to run everything I've developed on an 8.1 system so far. As old as VB6 is, I don't think it's realistic to count on this forever. That's what is motivating me to stop being complacent and take a serious look at VB .NET. It's not that I'm unhappy with VB6. It seems capable of doing everything I want.

    Thanks everyone for your input. It's all good and I'm compiling notes.

  13. #13
    Frenzied Member Gruff's Avatar
    Join Date
    Jan 2014
    Location
    Scappoose Oregon USA
    Posts
    1,293

    Re: Best way to learn VB .NET?

    I eventually converted all my active vb6 apps at work to vb.net.
    About fifty of them.
    Some were very large.
    Some were easy and some were a royal pain in the butt.
    Some were pretty much one to one conversions while others required rethinking the entire app.

    I am really glad I now only have one set of code to deal with.
    Jumping back and forth between vb6 and VB.NET gave me heart burn.
    If it were two very different languages I think it might have been easier to support both concurrently.
    Burn the land and boil the sea
    You can't take the sky from me


    ~T

  14. #14
    Frenzied Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    1,191

    Re: Best way to learn VB .NET?

    I'm in essentially the same boat as you. I did VB3, 4 and then 6 from mid 90s for manufacturing environments since that is what they provided. Just dabbled in 2008 (which as pointed out is the last version that offered the conversion tool for free - you can still buy the tool) for a couple projects several years ago. VB6 still works great for what I do and there was no reason to change but that is what th

    Unlike others have said, I have found it most useful to forget most of what I did in VB6 because it's too easy to use the old syntax without knowing it's obsolete (unless you specifically remove the Microsoft.VisualBasic namespace but then you also lose stuff that really is .Net). For example, MsgBox instead of MessageBox. Yes, things like that will work with the old syntax (maybe without any real penalty even) but if I'm going to use a new tool I want to use it the way it ideally should be used.

    So what I did for my first project, which was large by my standards, was convert my old project using 2008. Based on what kind of issues there were, I fixed them in the old project and reconverted. Then I started a new 2013 project and converted the final 2008 one. Then I started another 2013 one and built everything from scratch as much as possible and copy and paste the logic sections that seem to have converted the best to save some typing. Sometimes I found an example that was close to what I needed and adapted it to my needs. Happy to report it worked out pretty well except for poor performance from the BackgroundWorker so it's still using some old fashioned Do... Loops instead of threading.

    A few things like serial ports are radically different because of threading but they worked fine. Some things like control arrays and using Excel are much larger PITA now I'm finding (depending on what you need to do). But once you get something that works it should flow much better since you're in somewhat of a niche field as I am. The CLR has a TON of things built into it but I doubt I use even 5%. Once I figure out how to do the 5% I need for most of what I program, the rest is back to just changing the logic as needed and fitting things together for the individual project.

  15. #15
    Junior Member
    Join Date
    Apr 2015
    Posts
    23

    Re: Best way to learn VB .NET?


  16. #16
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,347

    Re: Best way to learn VB .NET?

    I think when going from VB6 to .Net you should first read up on new features that the language and offers such as inheritance, threading, lambda, linq, delegates etc.. then think of a few small practical projects that you could make quickly to use each of the features that you think are important. (just to note ... i think that ALL of the things I just listed are VERY important)

    There is a lot to learn that isn't "syntax"? related (libraries) but when you look up what library to use you can potentially make your use of it better with the coding concepts that you have learnt.

    IMHO it is the use of the language that defines how good a programmer is, NOT what their program can do based on the libs they used.

    Kris

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