Hardware Reference
In-Depth Information
Microsoft Visual Basic
Microsoft Visual Basic is an event-driven (see page 161), object-based struc-
tured programming language that has become extremely popular for use in
the development of data acquisition, control, and measurement applications.
Visual Basic supports a wide range of objects starting with the form that con-
tains an application into which further objects (known as controls ) are placed.
Command buttons, labels, text boxes, shapes, and timers are all examples of
controls that might be needed in a typical application.
As with virtually all modern programming applications, Visual Basic pro-
vides its own Integrated Development Environment (see Figure 6.8). This is
a multiple Windows-based environment which provides access to a Toolbox
which contains a selection of controls (more specialized controls can be added
to the Toolbox where needed), a Form window onto which the controls are
placed and modified (e.g. re-sized), a Code window where Visual Basic code
is inspected, entered and edited, and a Properties window which provides a
means of viewing and editing the properties of and currently selected object.
Typical object properties are caption, colour, font, and whether the control is
to appear enabled or disabled. The Project window lists all of the forms and
modules contained within a project and provides easy access to any that might
need editing whilst an Immediate window is provided for debugging purposes.
Visual Basic supports a wide variety of data types (including byte, Boolean,
integer, long integer, single- and double-precision floating point, currency,
decimal, date, fixed and variable length strings, and variant (this latter type
supports both numerical and string data).
Figure 6.8 The Microsoft Visual Basic IDE
Search WWH ::




Custom Search