You are on page 1of 6

Introduction to Visual BASIC

What is Visual Basic?


n Vi su a l B a si c i s a n o b j e c t - o r i e n t e d p r o g r a m m i n g
development system for creating applications that run
under any of the Microsoft Windows environments
n It differs from classical BASIC programming because
prewritten tools called controls which enable users
graphical user interfaces (GUI)
n A Visual Basic application, therefore consists of two
components; the controls and a set of commands based
classical basic programming
n Visual Basic programs are event-driven which means
each feature within the program is activated when the
user responds to an object e.g. icon click, checkbox
selection
Typical VB Application
q The typical VB application consists of the
following:
1. Forms: For creating user interface. The tools
used for this include the menu, status, title and
slide bars among others
2. Controls: These are graphical features drawn on
forms. Commonly use d co ntro ls includ e :
command buttons, option buttons, check boxes,
labels, text boxes, picture boxes and menus
Typical VB Application continued…
3. Objects: Forms and controls are referred to
collectively as objects
4. Properties: Defines objects appearance and
behaviours. These includes names, captions,
size, colour, position etc.
5. Methods: Built-in procedure that can be invoked
to impart some action on a particular object e.g.
show can be used to make hidden forms visible
6. Modules: Collection of general procedures, variable
declarations, and constant definitions used by application
Typical VB Application Continued…

6. Event Procedure: Code related to some


object. This is the code that is executed
when a certain event occurs
7. General procedure: Code not related to
objects. This code must be invoked by the
application
Steps in Developing VB Application
A summary of the steps involved in developing
a VB application is highlighted below:
q Designing the user interface
q Assigning properties to controls
q Attaching codes to controls

You might also like