Table of Contents:

I. Intro

II. History of Visual Basics

1.      How VB came to being a powerful language.

2.      Information about different versions.

III. Getting started

1.      Where to get VB.

2.      Versions availible

IV. About the VB layout

1.      Learning the basics

2.      Learning how to open up new projects

V. How to start coding

1.      The Code Window

2.      Code example

3.      Your first program!

VI. Terms you should now know

VII. Final Thoughts


I. Intro

Hello and welcome to my series of Visual Basic tutorials. The series will be composed of three lengthy lessons teaching you how to become a Visual Basic programmer. Right now your saying you yourself "should I learn C?, C++?, Delphi? Well my answer to you is with VB you will learn the basic structure of programming more easier than any other language. This is because VB is very visual oriented. So if your more of a visual learner this is a great language to learn and there are many jobs out there that are for VB programmers! So sit back and relax and get ready to learn. Here is a list of some supplies you might want to have before continuing on:

Supplies needed:

1.      A version of Visual Basic is needed. If you do not have VB you can download a shareware version here. Which is the VB5 CCE. So you will be able to build along but you will not be able to compile until you buy or register it.

2.      You may want to open notepad or get a pad and pencil to take notes as you go along. It is proven people learn better when they get involved which is what I will be targeting in this series.

3.      Turn off or disable any messangers or ICQ while reading you will become distracted which will slow down your comprehension, and take you a lot longer to complete.

Well thats about it now its time to start learning!

II. History of Visual Basics

How VB came to being a powerful language.

Around 35 years ago language designers developed a programming language that beginners could use. This was called BASIC. New programmers could become skilled quite quick. BASIC standed for Beginners All-Purpose symbolic Instrumental Code. So as you can see the language has developped in 35 years to become a strong learning language which will make learning other future languages very easy.


Information about different versions

Right now the most current version of Visual Basic out is Visual Basic 6. There are different levels of quality that are availible. Learning,Standard,Professional, and Enterprize. Price varies from around $10 (Learning edition which is also free by download) - $500 (Enterprize edition) about. The only diffence between them is mostly controls that are availible and more options to custumize VB. If you have VB 5 or 6 your in good shape because they are very similar. I personally would just recommend Standard Edition of VB6 if you plan on buying it.


III. Getting started

Where to get VB.

You can get Visual Basics anywhere around at a computer store. Also since its from microsoft you can get it from there site You can also try other online stores. If you still have problems finding a version you want in your price range, try calling some companies up in the phone book, but I'm sure you will be able to find a copy.


Versions availible

Right now there are 2 recent versions of Visual Basic. Visual Basics 5 and 6. Like I explained above, aim for the newer version. And depending on how much money you want to spend buy from Standard to Enterprise.


IV. About the VB layout

Learning the basics

Alright now that we are all setup and ready to get working I need to show you the basics of the VB layout. Please look at the following picture below. I will explain each window below.

After looking at the picture above I will explain what each does.

Tool Bar - This a tool bar the has all the menus and options you will need for various reasons later on.

Tool Box - The tool box has all of your controls (Text Box, Command button..etc.)

Controls - Controls are objects you will use for the graphic interface of your program. (Command buttons, Text boxes etc.)

Form - Your form is where you put all your controls and text on.

Project Explore - This window displays all your forms annd Modules.

Property Window - This holds all the properties for the object that is selected.

Form Layout - This window shows you how it will lookk when you run your program on the screen.


Learning how to open up new projects

Ok. Now that you have learned the basic setup of Visual Basics we will Open up a New project.

To Open a New Project: Goto the Tool Bar, Then select File, then New Project. Now at the screen that poped up select Standard EXE.

Now you should have a blank form1 with your Tool Box and project explore. Now it's time to code.


V. How to start coding

The Code Window

When you double click on a form it will bring up a window with something looking like the picture below:


That is the code window. You can double click on anything that is on your form like a command button or text button to put in commands and code. Now look at the top right hand side of the code window where the drop down menu is. This is where you can choose what kind of event you want it to look for when something happends.

Code Example


You have a command button on a form. Now lets say you want your program when loaded, to pop up a msgbox when you click on the command button.

How to do it:

To do this you would need to put a command button on the form then double click on the command button and put in between the start of the sub and End Sub:

Msgbox "Hello" 'This is how you make a message box pop up in VB

So when you click on command1 the command button it will pop up a msgbox with the text "Hello" in it.


VI. Terms you should now know

You should now know the basics of VB. Here are some terms to study and learn.

1.      Controls: are objects you put on a form (ie:Command button, textbox, listbox etc.)

2.      Forms: Where you put your controls on to make a program.

3.      Code Window: where you code of your project will reside.

4.      Properties: Each Control has its own properties. So if click on a textbox and scroll down to the property "Text" in the Property window you will find that shows you what text you want in the textbox.

5.      Drop down menu: A menu that when you click on it a list of choices will drop down.

6.      MsgBox: This is a command when used MsgBox "text here" will create a pop up box kinda like a error message.

7.      Command1: When you make a command button the name first one will be named Command1 and the next command button you make will be Command2 and etc. That goes for every control you use.

8.      Events: When ever you click on a button or type in a textbox or move your mouse over a control, you are doing a event. You can code to a specific event by selecting the right option in the code window in the top right.




Hosted by