Share via


Object Naming Conventions

When naming objects, use the following recommended format.

PrefixObjectName

Parameters

  • Prefix
    Specifies characters that indicate the associated object.

    The following table lists suggested values for Prefix.

    Prefix

    Object

    Example

    chk

    CheckBox

    chkReadOnly

    col

    Collection

    colFormObjects

    cbo

    ComboBox

    cboEnglish

    cmd

    CommandButton

    cmdCancel

    cmg

    CommandGroup

    cmgChoices

    cnt

    Container

    cntMoverList

    ctl

    Control

    ctlFileList

    cur

    Cursor

    curRecordsReturned

    cad

    CursorAdapter

    cadInventory

    <user-defined>

    Custom

    user-defined

    dte

    DataEnvironment

    dteSalesForm

    edt

    EditBox

    edtTextArea

    frm

    Form

    frmFileOpen

    frs

    FormSet

    frsDataEntry

    grd

    Grid

    grdPrices

    grc

    Column

    grcCurrentPrice

    grh

    Header

    grhTotalInventory

    hpl

    HyperLink

    hplHomeURL

    img

    Image

    imgIcon

    lbl

    Label

    lblHelpMessage

    lin

    Line

    linVertical

    lst

    ListBox

    lstPolicyCodes

    olb

    OLEBoundControl

    olbObject1

    ole

    OLE

    oleObject1

    opt

    OptionButton

    optFrench

    opg

    OptionGroup

    opgType

    pag

    Page

    pagDataUpdate

    pgf

    PageFrame

    pgfLeft

    prj

    ProjectHook

    prjBuildAll

    rel

    Relation

    relCustomerRelation

    rpt

    ReportListener

    rptListener1

    sep

    Separator

    sepToolSection1

    shp

    Shape

    shpCircle

    spn

    Spinner

    spnValues

    txt

    TextBox

    txtGetText

    tmr

    Timer

    tmrAlarm

    tbr

    ToolBar

    tbrEditReport

    xad

    XMLAdapter

    xadRemoteXMLData

    xfd

    XMLField

    xfdPrices

    xtb

    XMLTable

    xtbInventory

  • ObjectName
    Specifies the name of the object.

Example

The following example illustrates how the letters "cmd" indicate that the cmdCancel object is a CommandButton control:

cmdCancel

See Also

Concepts

Creating Visual FoxPro Names

Reference

Constant Naming Conventions

Table Field Naming Conventions

Variable Naming Conventions

Window Naming Conventions

Other Resources

Naming Conventions