Basic Start to VB6.0

DESIGNING FORMS  
Back To Main Page of Tutorial

To get started download a free software of visual basic from the Internet and install it.

Opening of the VB6 software.
After the installation of VB6, open the software. The following screen will appear.
Choose the standard EXE and click on open. The following screen will appear.

Explanation of the different toolbars
(i) General toolbox
The general tool bar is found on the left hand side of the screen. If it is not visible, follow the step: click on View then toolbox.
(ii) The Project window
It displays the name of the project and the different forms. Each forms has a unique name. No two forms have identical name.
In order to rename the form, here the name of the form is Form1, the properties window is used.
(iii) The Properties Window
GETTING STARTED WITH FORM DESIGN
The following forms need to be designed.
To design any form, the different tools on the toolbox need to be selected and dragged onto the grey form as shown below.
1. Click on the label tool and drag it on the grey window. A label1 will appear on the form as shown below
The label1 need t be rename. To do this, move to the properties window and look for the caption property as shown below
Whatever is written on the caption property, it will    appear on the screen. So, in our case type “WELCOME TO THE DATA ENTRY FORM”.

Now the formatting part.
In order to modify the looks of the text, select the font property as shown below.
Modify the text as you like it most and press ok to see the changes made to the text.
2. To insert a frame, select the tool frame and make a rectangular shape on the grey form. The present name that will appear on the frame will be “Frame1”.To rename the frame, move to the properties window and select caption as we have done for the label.
3. To insert the different label such as name, address, gender, favorite colour, contact number and category of film, the same procedure is repeated as for step one above. The form should be as shown below.
4. To insert the TextBox, select it and drag it next to name in the frame as shown below:
NOTE: Everything that is dragged and positioned onto the grey window should have a name and it is unique. It is the same as for an individual. Every individual have a unique name. So in this case, the name of the TextBox next to “name” is called Text1. The latter can be modified as you like using the name property in the properties window. To modify the name follow the steps below:
Step 4.1: Use the cursor and click on the textbox.
NOTE: Do not DOUBLE CLICK on the textbox. If you have DOUBLE CLICK on the textbox, close the white window that will appear and CLICK ONCE on the textbox.
The textbox should be as shown above.
Step 4.2: Move to the properties window and select name
Modify the name and change it to “txtname”.
NOTE: You can give any name that you want as long as it is only one word.
Examples: name_text, nameoftextbox.
5. Repeat steps 4.1 and 4.2 for the “address” and “contact number” on the frame.
6. Click on the optionbuuton to insert male on the grey form.
In order to change the initial name “option1” to “male”, select the Option1 as shown above and select caption in the properties window. Modify it to male.
7. Repeat the same procedure for “Female”.
NOTE: This one will be called Optionp2 by the software.
8. To insert a ComboBox, select and drag it onto the frame.
NOTE: Another name for ComboBox is Drop Down Menu. The latter is used when the user need to choose only one data from a list of data.
Follow the steps below.
9. To insert a CheckBox, select and drag it onto the frame.
10. Repeat the same procedure for CheckBox Thriller, Adventure and Comic.
11. Insert another frame and follow the steps below:
12. To insert the CommandButtons on the frame, follow the steps below:
So the final form that you have created should look like the one below.