Wyo VB - Ch. 3 Notes

Objective #1: Use Dim statements to declare variables and understand the physical process of memory (RAM) allocation.

Objective #2: Understand each of the basic data types used by Visual Basic.

data type

prefix

characteristics

range

size (bytes)

Byte
byt
a single character (letter, symbols, or digit) 0 to 255 1
Integer
int
whole numbers only -32,768 to 32,767 2
Long
lng
whole numbers only -2,147,483,648 to 2,147,483,647 4
Single
sng
decimal numbers -3.4E38 to -1.4E-45 for negative values; 1.4E-45 to 3.4E38 for positive values 4
Double
dbl
large, decimal numbers -1.8E308 to -4.9E-324 for negative values; 4.9E-324 to 1.8E308 for positive values 8
Currency
cur
more precise than Single or Double for representing money; unlike Single, it accurately rounds to the fourth decimal place (ten-thousandth's) +/- 922 trillion to 4 decimal places 8
String
str
text, symbols, digits 0 to about 65,000 bytes varies
Variant
var
numbers or strings, uses much memory; avoid using if possible variable varies

Objective #3: Know how to use the InterCap method and the appropriate data type prefixes when naming variables.

Objective #4: Use the order of operations to evaluate expressions and to write proper expressions.

Objective #5: Be able to translate algebraic expressions to Basic.

Objective #6: Know how to write assignment statements to evaluate expressions and assign the resulting values to variables and properties.

Objective #7: Know how to set break points, examine values of variables and expressions in the Debug window, and single-step through programs.

Objective #8: Be familiar with the naming convention used for controls.

Objective #10: Be able to change the properties of controls.

Objective #11: Explain how Visual Basic responds to the Click event.

Objective #12: Explain the term event-driven programming.

userevents.gif (2292 bytes)

Objective #13: Properly design the user interface using objects' TabIndex properties, the SetFocus method, and the focus along with keyboard shortcuts and Clear buttons.