Learning VB

ItsPat

Senior member
Jun 22, 2003
288
0
71
I have been trying to learn to program, but I am not sure where to start. I read a VB book, did all the examples but I got to about page 800 and realized I didn't really know anything. The book seemed to be more targeted for people trying to learn the syntax.

I really want to find a book/tutorial that helps me learn how the logic behind programming in general. Does anyone know of anything for VB like this? I am going to take a few VB classes when I can but I'd like to start learning now.

I have taken a few programming classes in college, but it was a lot of copy/paste code and it was a while ago. I pretty much just want to start from scratch, and make sure I understand all the basics. (arrays, loops, if statements, etc.) At this point, I know what they are, and what they do -- but not really how to use them.

I'd like to learn VB because it would be a big asset at work. I do a lot of spreadsheet work in Excel, and would love to harness the power of VBA. But, I am up to learning another language if it will help me understand the basics better and problem solving easier.
 

drebo

Diamond Member
Feb 24, 2006
7,034
1
81
Originally posted by: ItsPat
I really want to find a book/tutorial that helps me learn how the logic behind programming in general.

VB is a terrible language for that.
 

ItsPat

Senior member
Jun 22, 2003
288
0
71
Originally posted by: ItsPat
But, I am up to learning another language if it will help me understand the basics better and problem solving easier.

Do you have any suggestions on where to start then?

 

Net

Golden Member
Aug 30, 2003
1,592
2
81

i have the perfect suggestion for you.

think of a cool program you want to write and start writing it. don't worry if you don't have the knowledge currently to accomplish what the program will require. its during the time you spend trying to figure out how to "do it" that you will learn the most.

start with a game. those are the most fun.

or write a port scanner. something that is fun and will keep you engaged.
 

Net

Golden Member
Aug 30, 2003
1,592
2
81
also. if you want to really learn the basics then use C. visual basic covers the basics up, thats what makes it easy.
 

brandonb

Diamond Member
Oct 17, 2006
3,731
2
0
1) You need to download VB.Net Express Edition 2008.
2) Once installing, you want to load it up, select "Windows Forms Application" as a start.
3) You are presented with a blank form. Now you need to decide: What is it that I want to program? Because without an idea of what you want to do, you can't really use your knowledge or get over the hump. Let me give you a start.

I want you to create a program which parses a text file. Reads the first character of the line, and if the first character is a 2... Add the line to a listbox on the screen.

A listbox is a box where lists many lines and you can click on them, much like windows explorer list of files in a directory.

4) In order to do such a task, you need a place for the program to start. Add a button by using the toolbox. To put in code, you double click on the button and it will bring you to the code behind the button. This is where you start.

5) You can either learn how to use the file dialog to bring up a directory lister. Or just hard code in a path. You will need to learn a bit about the following .net class:

Dim datain As System.IO.StreamReader

So look up StreamReader in the help. That will give you all you need to load up the file and parse through it and examples.

6) Once you have it parsing, you need to drop a ListBox on the form somewhere, and add the info to it...

7) Create a file to work with. Add random crap to the file, but somewhere in there in a few lines just add a 2 as the first character.

Run.

This task will teach you about: Basic forms interaction, adding items to a listbox, what code to run when clicking a button. It will give you basic file IO knowledge. It will also allow you to do some basic if... statements (what if the line is empty you can't parse out the first character). And a loop of some sort.
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
My university used Deitel in their intro to VB.NET 2005 class, A VB.NET 2008 edition is in the works.

Most of the hate you see towards VB is directed at VB6 and earlier. VB 2008 is an object oriented .NET programming language, so it should be very functional.

I have not used VB.NET in a while (I mainly use C / C++ and JAVA these days in my programming and database related classes now that my assembly hazing is over), but I have fond memories of it. When I do my side projects, I mainly use C++ to stay sharp;)