Introduction: Starting Visual Basic Programming

Hi and welcome to the first in what I hope to be a series of tutorials explaining the basics of visual basic 2008.

I have been working with this language for a while now and have a solid understanding of the basics however I am not the best teacher so if this is not clear or you don't understand something then just message me and I will try to help.

Towards the end of these tutorials I am going to attempt to teach you some graphics ! When you have the graphics down then you will be laughing.

Step 1: What You Need

You will need a piece of software called Microsoft visual basic. I have always used the express editions and have never had any problem code wise.

This software is what we call an IDE ( Integrated Development Environment ) and basically it does most of the work for you. All you have to do is design it and add the code and the software does the rest.

It uses something called a compiler to interpret the code into something that your computer understands and makes an executable file.

Here is the link to the software: http://www.microsoft.com/express/Downloads/#2008-Visual-Basic

Step 2: Creating Your First Program -=Step 1=-

Once you have downloaded the software then open it and we will begin to write our first program !

Use the pictures i have attached to help you.

When it opens up click on the link next to where it says 'Create:'

Select windows form application, name appropriately and click OK.

Here is a helpful website that gives code examples etc.. : http://msdn.microsoft.com/en-us/vbasic/default.aspx

Step 3: Knowing What's What

When you have clicked OK then it should take you to a screen With menus on either side and a blank program in the middle.

The menu to your left is called the toolbox, use this to add things to you program.

The menu on your right is currently set to properties or maybe properties and solution explorer. ( All will be revealed in good time )

There is a tool bar with icons like the save icon at the top this is used for debugging etc... ( Stay with me it will get better but you need to know this stuff )

See the pictures for detail then move on to the next step.

Step 4: Adding Things !!!

Look at the tool box on your left, now drag:
1 button and one label onto the form.

Click on the button and its properties should appear on the right hand box. change its name to addone and then change the text property to +1.

Now click on the label, change its name to lblone and change its text to 0.

Now time for your first bit of code...

Step 5: The Code !

 Your Form Should now look a little bit like this, I have resized mine because I am fussy :S,

Now, double click on any part of the grey area of the form, it should take you to a code window.

Now type this:

Dim x as integer

Now go to the button and double click it and type this:

x = x + 1
lblone.text  = x

Now you are all finished, press F5 to run it.