2. The Visual Basic Language
Visual Basic Symbolic Constants
- Many times in Visual Basic, functions and objects require data
arguments that affect their operation and return values you want
to read and interpret. These arguments and values are constant
numerical data and difficult to interpret based on just the numerical
value. To make these constants more understandable, Visual Basic assigns
names to the most widely used values - these are called
symbolic constants. Appendix I lists many of these constants.
- As an example, to set the background color of a form named
frmExample to blue, we could type:
frmExample.BackColor = 0xFF0000
or, we could use the symbolic constant for the blue color (vbBlue):
frmExample.BackColor = vbBlue
- It is strongly suggested that the symbolic constants be used
instead of the numeric values, when possible. You should agree that
vbBlue means more than the value 0xFF0000 when selecting
the background color in the above example. You do not need to do anything
to define the symbolic constants - they are built into Visual Basic.
Counter Hit
This Homepage is special brought to you by CK Tan