Results 1 to 14 of 14

Thread: [RESOLVED] Why is VB so hard to comprehend?!?!

  1. #1

    Thread Starter
    Member G33kman's Avatar
    Join Date
    Nov 2009
    Location
    Mankato, MN
    Posts
    40

    Resolved [RESOLVED] Why is VB so hard to comprehend?!?!

    Ok so I've been reading tons of information online about VB.net and I have a book (WROX - Beginning Visual Basic 2012) that I've been reading through and doing the exercises and trying repeatedly to understand what the heck I'm doing here but I feel like I just keep getting lost...
    Everyone keeps saying how easy VB is to learn but I can't seem to wrap my head around it. I understand the IDE and placing buttons and such and I understand how to make a "Hello World" application and can do pretty much all of the "basics" of coding but I just seem lost when it comes to anything even moderately advanced.
    Now when it comes to website design (I know totally different concept than OOP) I taught myself everything from HTML to CSS to SEO and I feel confident in it but when it comes to VB I understand the basics and I am completely familiar with the windows filesystem and most things windows.
    I've run a business for the last 4 years (which has provided most of my income) so I feel confident that I should be able to work through this and start programming windows applications. I enjoy coding and making things work by writing out what the program will do but it's just becoming more and more frustrating. :/
    Anyone have any tips or ANYTHING that I can do to get this figured out.
    I understand that this is by no means learning how to reformat a hard drive or reload windows but I am extremely ambitious about learning this as I see it being a major advantage over my local competition...
    Thanks for your help and I can completely understand if this seems easy to you and maybe even frustrating...

    Ryan

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,371

    Re: Why is VB so hard to comprehend?!?!

    The way that I learned was by doing projects that could be used in the real world. Sure hello world and calculators are great teaching materials, but won't really do anything for you other than learning. Once I understood the basics, what I started to do was working on a very comprehensive data management program. Doing so really taught me a lot. It taught me how to obviously work with databases, but it also taught me how to do printing operations and correct program flow. I would suggest trying to tackle on a medium to large size project and only try to use MSDN or VBForums as a reference, rather than trying to find full lengths of code to satisfy your need.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: Why is VB so hard to comprehend?!?!

    as dday said, pick a fairly complex subject + dive in. you might need some help from this forum, MSDN, or google, but you are sure to learn loads along the way.

  4. #4

    Thread Starter
    Member G33kman's Avatar
    Join Date
    Nov 2009
    Location
    Mankato, MN
    Posts
    40

    Re: Why is VB so hard to comprehend?!?!

    Ok perfect thanks a lot!
    I'll look around and try to find a good (medium) tutorial to start out with. I always try and read through the code that I find and understand it (so that I actually learn something) rather than just copying and pasting the code so hopefully this will help me out.
    Again thanks for the help!

    Ryan

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

    Re: Why is VB so hard to comprehend?!?!

    Well you have started well using wrox.com Some things may take time but eventually they will, sink in. Perseverance. I would advise only to use trusted sources while you learn. Not google. VB is such an abused language that allows applications that would take a lot of time written in another language very quickly. The internet is filled with poor examples of coding regarding VB especially with option strict off(Now go turn option strict on). I admit i was once a causality. There is only a bad teacher. Not a bad language so never listen to people who say VB gives you bad habits.

    Msdn is your first strop regarding any query's. http://msdn.microsoft.com/en-us/ and of course http://www.vbforums.com/ for help. Now i am going to contradict myself and say use google.

    Example:

    site:vbforums.com Save a text file
    site:msdn.microsoft.com Save a text file


    Stick with wrox. Get a good VB reference book.
    My Github - 1d3nt

  6. #6
    Addicted Member
    Join Date
    Nov 2006
    Posts
    129

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    View all youtube videos about VB.NET, after you view about 100 of them you should already know everything about VB.NET.

    If Classes make VB.NET hard for you stay away from them code everything in a Module (those things are shared with the whole program) so you won't have any problems...

    Thing is VB6 edition didn't have classes it just had Modules and Public Types which are in VB.NET renamed to Public Structure's they would of acted like Classes in VB6.. Well VB6 did actually have Classes but no one ever used them AFAIK.

    Just when you place a new button to the form or new textbox or any control view it's properties and change Modifiers to Public this why you will avoid all the new problems in VB.NET like Cross Threading problems, Delagates and all those complicated things it's like converting VB.NET to the old VB6 in a way you would be able to do things like
    Code:
    Form1.TextBox1.Text = "hello"
    instead of
    Code:
    Dim form as New Form1
    form.TextBox1.Text = "hello"
    In the bottom case you will always need to pass the reference form everywhere you travel and in some cases even acessing TextBox1 like that if modifier isn't public you'll have to create functions inside the form just to call the TextBox which makes it even more complicated.

    Other then that VB.NET is extremely easy, the problem is the new OOP I agree with that, there should be a way to stay away from it for a while, while you are learning

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

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    The above post helps emphasise why not to use google.
    My Github - 1d3nt

  8. #8
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    Quote Originally Posted by ident View Post
    The above post helps emphasise why not to use google.
    depends on your level of understanding what is right + wrong in vb.net.
    google can be helpful, but it can also be a hindrance...

  9. #9

    Thread Starter
    Member G33kman's Avatar
    Join Date
    Nov 2009
    Location
    Mankato, MN
    Posts
    40

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    Yeah I'll definitely stick to this site and of course MSDN.

    I am currently working on a tutorial and I wanted to try and go off of it and add some additional stuff to it to see how it would work out and so far I have a combo box that has a couple items in it and at the end of the list I have a selection "Add New..." when that is selected it enables a text box that you can type information into when there is text in this text box it will enable a button "Add" and when this button is clicked it will add that textbox.text into the combo box item list. Everything is working fine except it adds the new item in below the "Add New..." item and I would like it to add this above this so that the "Add New..." item is always at the bottom. Any Help?

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

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    Code:
    ComboBox1.Items.Insert(ComboBox1.Items.Count - 1, "your item")

  11. #11
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,371

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    You should really start a new thread for each question, but the solution is pretty simple:

    Code:
        Private Sub AddItem(ByVal txtbox As TextBox, ByVal combo As ComboBox)
            'Get the string
            Dim str As String = txtbox.Text
    
            'Remove the "Add New..."
            combo.Items.RemoveAt(combo.Items.Count - 1)
    
            'Add the text
            combo.Items.Add(str)
    
            'Add the "Add New..." back
            combo.Items.Add("Add New...")
        End Sub
    Edit - Or use Insert(a method I didn't know about until I read .paul.'s post)
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  12. #12

    Thread Starter
    Member G33kman's Avatar
    Join Date
    Nov 2009
    Location
    Mankato, MN
    Posts
    40

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    Quote Originally Posted by dday9 View Post
    You should really start a new thread for each question, but the solution is pretty simple:

    Code:
        Private Sub AddItem(ByVal txtbox As TextBox, ByVal combo As ComboBox)
            'Get the string
            Dim str As String = txtbox.Text
    
            'Remove the "Add New..."
            combo.Items.RemoveAt(combo.Items.Count - 1)
    
            'Add the text
            combo.Items.Add(str)
    
            'Add the "Add New..." back
            combo.Items.Add("Add New...")
        End Sub
    Edit - Or use Insert(a method I didn't know about until I read .paul.'s post)
    Yeah I thought about that but I wasn't sure since it "kind of" pertained to what I was talking about already. Lol
    Thanks again for the help guys I really appreciate it!

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

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    Quote Originally Posted by .paul. View Post
    depends on your level of understanding what is right + wrong in vb.net.
    google can be helpful, but it can also be a hindrance...
    But that's exactly my point. The OP wont know what query's to google, what's right etc. How would any new programmer.
    My Github - 1d3nt

  14. #14
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: [RESOLVED] Why is VB so hard to comprehend?!?!

    Quote Originally Posted by G33kman View Post
    Why is VB so hard to comprehend?!?!
    I think it boils down to two major reasons:
    1) Equality operator and assignment operator are the same.
    2) When dimensioning arrays, you specify the maximum index not the length.
    </VBvsC#FlameBait>

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
  •  



Click Here to Expand Forum to Full Width