Page 41 - Open Soource Technologies 304.indd
P. 41
Unit 3: Understanding Controls and Control Events
On start up, Visual Basic will displays the following windows:
• The Blank Form window
• The Project window
• The Properties window
It also includes a Tool Box that consists of all the controls essential for developing a VB
Application. Controls are tools such as boxes, buttons, labels and other objects draw on a form
to get input or display output. They also add visual appeal.
If the Description pane is not visible, right-click on the Properties window, and then
click on “Description.” The Description pane describes the currently highlighted
property.
3.1.3 Understanding the Tool
Box
Pointer Picture Box
You may have noticed that when you
Label Text Box
click on different controls the Properties
Window changes slightly this is due to Frame Command Button
different controls having different
Checkbox Option Button
functions. Therefore more options are
needed for example if you had a picture Combo box List Box
then you want to show an image. But if Horizontal Scrool Vertical Scrool Bar
you wanted to open a internet
connection you would have to fill in the Timer Drive List Box
remote host and other such settings.
Directory list box File List Box
When you use the command ( ) you
will find that a new set of properties Shape Data Line
come up the following will provide a
Image Line
description and a property.
OLE
Figure 3.3: Tool Box.
3.1.4 Opening an Existing Visual Basic Project
Microsoft have included some freebies with visual basic to show its capabilities and functions.
Dismantling or modifying these sample projects is a good way to understand what is happening
at runtime. These files can be located at your default directory /samples/.
To open these projects choose ‘Open Project’ from the ‘File’ menu. Then double click on the
samples folder to open the directory then double click on any project to load it.
3.1.5 Opening a New Visual Basic File and Inserting Source Code
From looking at the examples it time to make your own application. Choose ‘New Project’ from
the ‘File’ menu. Use the blank form1 to design a simple interface for an estate agents database,
have some textboxes for names and other details. Insert some controls and make it look
LOVELY PROFESSIONAL UNIVERSITY 35