Wyo VB Ch. 2 Lecture Notes

Objective #1: Use forms appropriately.

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

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

data type

prefix

characteristics

range

size (bytes)

Boolean
bln
True or False True or False 2
Byte
byt
a single character (letter, symbols, or digit) from the Unicode chart 0 to 255 1
Char
chr
a single character from the Unicode set 0 to 65535 2
Integer
int
whole numbers only -2,147,483,648 to 2,147,483,647 4
Long
lng
whole numbers only -9,223,372,036,854,775,808 to -9,223,372,036,854,775,807 8
Single
sgl
decimal numbers -3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values 4
Double
dbl
large, decimal numbers -1.79769313486231E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values 8
Decimal
dcm
better precision to store decimal values than Single or Double +/-79,228,162,514,264,337,593,543,950,335 with no decimal point; +/-7.9228162514264337593543950335 with 28 places to right of decimal; smallest nonzero number is +/-0.0000000000000000000000000001 8
Date
dtm
store dates January 1, 0001 to December 31, 9999 8
String
str
text, symbols, digits 0 to about 2 billion Unicode characters 10 + (2 * string length)
Object
obj
any type can be stored n/a 4
Collection
col
groups of objects are stored in Collections    
User-Defined Type
udt
we will not be studying user-defined types    

(We will not be using some of the data types mentioned in this chart until later in the course.)

Objective #4: Name variables using the InterCap method and the appropriate data type prefixes.

Objective #5: Use assignment statements to calculate and store mathematical results and to change the properties of objects.

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

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

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

Objective #9: Determine the scope of a variable.

Objective #10: Add graphics to a form.

Objective #11: Use the computer graphics coordinate system.

Objective #12: Use color with objects.

Objective #13: Use the DrawLine, DrawEllipse & other Graphics class methods.

Objective #14: Use a call statement to execute a method from another method.

Objective #15: Create your own method that is not tied to an event.

Objective #16: Understand the concept of reusability

Objective #17: Use Flash swf files in a VB project.