Share via


AutoCenter Property

Specifies whether the form object is automatically centered in the main Visual FoxPro window or on the desktop the first time it is displayed. Available at design time and run time.

Object.AutoCenter [ = lExpr]

Return Value

  • lExpr
    Specifies whether the Form object is centered or placed according to the settings of the Top and Left properties. The settings for the AutoCenter property are:

    Setting

    Description

    True (.T.)

    The Form object is centered and the values of the Top and Left properties are set to the new position.

    False (.F.)

    (Default) The Form object is not centered and is placed at the coordinates specified by the Top and Left properties.

Remarks

Applies To: Form Object | _SCREEN System Variable

Forms are displayed in the main window, so setting AutoCenter to true (.T.) centers the form within the main window.

Note

Resetting AutoCenter to false (.F.) after it has been set to true (.T.) will not return the form to the original Top and Left position.

See Also

Reference

Desktop Property

Left Property (Visual FoxPro)

Top Property (Visual FoxPro)

Other Resources

Properties (Visual FoxPro)

Language Reference (Visual FoxPro)