none
Instruction Suggestions RRS feed

  • Question

  • I have been working with Visual Basic for a little while now and have reached the point where I am beginning to do some rather complex things with the code.  What this has taught me is that I require a much better understanding of what it is and how to use it, I have learned that I have only scratched the surface and that the syntax, structure and organization of commands go so much further than my current capabilities.

    Can anyone suggest to me an in depth Visual Basic guide or program or instruction that would enable me to move from a mediocre hack to someone who could fluently speak and work the language?


    gwboolean

    Wednesday, February 21, 2018 6:03 PM

All replies

  • Well this can go in several directions yet a good starting point is here.

    Some thoughts.

    • A developer who will create many apps/solutions will create a shared/team library which is not really talked about much and would suggest this. Although it's C# (I wrote it) look at the following for a starter for a shared library. Also TechNet shared libraries.
    • When creating a shared library have unit test to fully test the methods.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites


    Wednesday, February 21, 2018 6:16 PM
    Moderator
  • You have the choice you use VB as many do as a kind of scripting code or you use it in OOP style. OOP style is not OO although it uses that. 

    If you use VB in OOP style you are all the time creating and making classes. A class is nothing more than a template which you can reuse many times. A class holds no data. Even more empty is an Interface. Not the same as a hardware interface, but what we all call a contract. But that is just a word. You can use it to let a cat behave like a dog if they inherit (or use) the same class. 

    Keep in mind in VB there are no commands like in scripting language, there are methods. VB has 2 types of methods Functions and Subs. The difference is that the first always returns something and a sub does not (you can pass an object but that is old fashion C++).

    A method is one of the members, there are 2 other members Properties and Constructors. 

    Beside that you have Fields, Keywords and Events. 

    I hope that I've told all important vocabulaire from VB that if you try to use those and to understand them learn good writing VB. 

    However, even more. 

    Know that bad programmers present themselves by the huge quantity of code they need to solve something. Don't be afraid to write the same problem again trying to do it with less code.

    And then not outcomment that code, remove it. 

     


    Success
    Cor


    • Edited by Cor Ligthert Wednesday, February 21, 2018 6:44 PM
    Wednesday, February 21, 2018 6:42 PM
  • The Visual Basic language isn't that complicated, but the extensions available (namely the .NET Framework) are rather vast. I've been working with the .NET version since the first beta and I still don't remember all of various namespaces and libraries, it's too big, but I just know how to look for the info I need based upon my 25+ years of Windows development. Maybe you could provide a specific example of what type of information you are looking for? Is it more about the Visual Basic language or is it more about .NET?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Wednesday, February 21, 2018 6:51 PM
  • I don't understand the question.

    A good way to learn is to learn how to solve specific problems.

    Something else you could do is choose a topic and learn more about that. A possible topic is collections. Another possible topic is databases, Entity Framework in particular. Another topic is windows and controls; how to create more complicated windows. If you are unfamiliar with WPF then learning that and XAML is beneficial.

    You could read one or more books and I am sure there are ample resources suggesting books. You can look for book reviews but my experience is that book reviews in Amazon tend to be positive even for lousy books.



    Sam Hobbs
    SimpleSamples.Info


    Wednesday, February 21, 2018 7:16 PM
  • Karen,

    Thanks, I will look through what you provided.

    Cor,

    Thanks, that helps.  I am already at the point where I can see that code can probably be much more efficient than how I currently do things.  Where would you suggest to go to see what would make for efficient and good code.

    Paul,

    It is not so much what I am looking to use it for as that I would like to be able to better understand how to things work in VB.  An example might be something as simple (yeah right) as fully understanding how inheritance works or how to properly put together the syntax/command for calling a function that returns and object.

    Sam,

    There are a plethora of books out there.  I would like to know which books might give me the most bang for my buck.

    All, thanks for the info and suggestions.


    gwboolean

    Wednesday, February 21, 2018 10:56 PM
  • An example might be something as simple (yeah right) as fully understanding how inheritance works

    For inheritance and related subjects you will want a book about Object-Oriented Design and/or Programming. Your choices would be limited if you want a book with VB.Net as source code.

    Sam,

    There are a plethora of books out there.  I would like to know which books might give me the most bang for my buck.

    I cannot suggest anything and I am sure there are very many suggestions available elsewhere.



    Sam Hobbs
    SimpleSamples.Info

    Thursday, February 22, 2018 4:03 AM
  • .

    Cor,

    Thanks, that helps.  I am already at the point where I can see that code can probably be much more efficient than how I currently do things.  Where would you suggest to go to see what would make for efficient and good code.


    Always think about maintainability in the first place. What is good code can be discussable. I myself find the code advices in Visual Studio for VB based on the hyroglyphs of C languages where only nanoseconds are important. 


    Success
    Cor

    Thursday, February 22, 2018 4:17 AM
  • Thanks all,

    I can see some places I should go for the kind of information that I need.


    gwboolean

    Thursday, February 22, 2018 4:41 AM
  • Paul,

    It is not so much what I am looking to use it for as that I would like to be able to better understand how to things work in VB.  An example might be something as simple (yeah right) as fully understanding how inheritance works or how to properly put together the syntax/command for calling a function that returns and object.


    gwboolean

    The below link provides the basics of OOP in Visual Basic:

    https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/object-oriented-programming

    Deborah Kurata's book was written a number of years ago but it covers the bases:

    https://www.amazon.com/Doing-Objects-Visual-Basic-2005/dp/0321320492

    You won't find any books that cover everything. There's simply too much subject matter. That's why it's generally best to target certain subjects and try to find articles and books that cover it.


    Paul ~~~~ Microsoft MVP (Visual Basic)


    Thursday, February 22, 2018 1:54 PM