GNVQ
Intermediate IT Optional Unit5
Tutors Sue Cahill and Colin Duley
A Visual Basic program is created in 5 stages:
1. Creating a new form, which will be the interface between the user and the program. The form will hold the various controls. A program must have at least one form and more complex programs can have several.
2. Attaching controls to the form. Controls are selected from the toolbox and drawn in the size and position that you, the programmer, require.
3. Setting the “properties” of the controls. These properties decide the initial appearance of the control and can govern how it works.
4. Writing code. You will write code to respond to the events associated with the controls.
5.
Testing the program. The program is tested thoroughly and errors
or bugs eliminated. A final working .EXE file will be produced.
Below are listed some of the controls and what they can be used for.
| Control name | Use | Example |
|
Label
|
Display a message
|
“Please enter your name”
|
|
Text Box
|
Allow a user to enter data
|
Respond to a request as above
|
|
Command Button
|
Click for action
|
OK, Exit, Yes, No
|
|
Image Box
|
Display a graphic
|
Put a picture or drawing on your form
|
|
Option Button
|
Choose one from several options
|
Choosing character size
|
|
Check Box
|
Select one or more option from a set
|
Setting options on or off
|
| Top of Page | Home Page | Query for Tutor? |