Follow this suggested format for naming objects.
Syntax
PrefixName
Suggested prefixes for object names are listed in the following table.
Prefix | Object | Example |
acd | ActiveDoc |
|
chk | CheckBox |
|
cbo | ComboBox |
|
cmd | CommandButton |
|
cmg | CommandGroup |
|
cnt | Container |
|
ctl | Control |
|
<user-defined> | Custom |
|
edt | EditBox |
|
frm | Form |
|
frs | FormSet |
|
grd | Grid |
|
grc | Column |
|
grh | Header |
|
hpl | HyperLink |
|
img | Image |
|
lbl | Label |
|
lin | Line |
|
lst | ListBox |
|
olb | OLEBoundControl |
|
ole | OLE |
|
opt | OptionButton |
|
opg | OptionGroup |
|
pag | Page |
|
pgf | PageFrame |
|
prj | ProjectHook |
|
sep | Separator |
|
shp | Shape |
|
spn | Spinner |
|
txt | TextBox |
|
tmr | Timer |
|
tbr | ToolBar |
|
Remarks
Prefixes aren't required, but are recommended as good programming practice. Using a prefix does not dictate the contents of an object variable — in Visual FoxPro, prefixes are used only as a naming convention. For example, adding the prefix "cbo" does not check that the object referenced by the variable is a combo box, but it does help you remember the object referenced by the variable.
For more information, see Visual FoxPro Naming Rules.