This table lists the naming conventions for objects created by Standard Visual Basic Controls.



Object Use Prefix Example
combo box allows a drop down menu and the user can select the one they want cbo cboLanguage
check box allows the user to make a simple yes/no type of selection chk chkDisplayalways
command button a button that when clicked will perform an action

(Its code)

cmd cmdOk
form a canvas for all the objects, may use more than one form frm frmCalculator
image use the Image control to display a graphic. The image control uses fewer system resources and repaints faster than a PictureBox control img imgClown
label a label control is a graphical control you can use to display text that a user can't change directly lbl lblTown
option button an OptionButton control displays an option that can be turned on or off opt optGender
picture box a PictureBox control can display a graphic from a bitmap, JPEG, or GIF files. It clips the graphic if the control isn't large enough to display the en tire image pic picHouse
text box a text box control can display text enter by the programmer and can also accept text from the user txt txtName

Variable Types
Uses
Prefix
Single
numbers, possibly decimals
sng
Double
numbers, possibly decimals
dbl
Integers
numbers, no decimals
int
Long
numbers, not decimals
lng
Currency
dollar values
cur
String
text
str
Boolean
true or false
bln








It is important to name objects consistantly because it shows instantly and clearly what the object is later in the program. Naming note
Index
Hosted by www.Geocities.ws

1