Object Prefixes
In VB6 you can name objects however you want as long as the names contain no spaces or punctuation and are 40 characters or less. This does not mean you should name objects randomly, though. Consistent prefixes help you to find and identify objects. The following table shows the recommended prefixes.
Object | Prefix | Example |
Combo Box | cbo | cboBonus |
Check Box | chk | chkYourReality |
Command Button | cmd | cmdPerformance |
Data | dat | datUra |
Directory List Box | dir | dirHome |
Drive List Box | drv | drvSafely |
File List Box | fil | filRoom |
Frame | fra | fraPictures |
Form | frm | frmIncidentReport |
Grid | grd | grdLock |
Horizontal Scroll Bar | hsb | hsbLongName |
Image | img | imgCapture |
Label | lbl | lblNameTag |
Line | lin | linWalk |
List Box | lst | lstCharges |
Menu | mnu | mnuValue |
OLE client | ole | oleCafe |
Radio Button/ Option Button | opt | optCheapTickets |
Picture Box | pic | picFamily |
Shape | shp | shpPreschool(circle, square, oval, rectangle, rounded rectangle, and rounded square) |
Timer | tmr | tmrRound |
Text Box | txt | txtVaticanus |
Vertical Scroll Bar | vsb | vsbThousandPardons |
No comments:
Post a Comment