The "Read" Form

Form Properties and Events

Window settings used in FoxPro 2.x are mapped to Visual FoxPro Form properties.

Form Properties

Visual FoxPro Form Property

FoxPro 2.x Equivalent

Functionality

Name

Screen Name

Specifies the name of the form.

Top

Vertical Position

Determines the distance between the top edge of the Form and the main Visual FoxPro window.

Left

Horizontal Position

Specifies the distance between the left edge of the Form and the main Visual FoxPro window.

Height

Height

Specifies the vertical dimension of the Form.

Width

Width

Specifies the width of the Form.

Caption

Title

Specifies the text displayed in the Form's title bar.

FontName

Font (FontFace)

Specifies the name of the font used to display text.

FontBold

Font Style Bold

Specifies that text is bold.

FontItalic

Font Style Italic

Specifies that the text it italic.

FontSize

Font Size

Specifies the size of the font.

Movable

Window Attribute Moveable (Float)

Specifies whether the Form can be moved at run time by the user.

Closable

Window Attribute Close

Specifies whether the Form can be closed by double-clicking the Control-menu box or choosing Close from the Control menu.

HalfHeightCaption

Window Attribute Half Ht Title Bar

Specifies whether the caption of a Form is half the normal height.

MinButton

Window Attribute Minimize

Specifies whether a Form has a Minimize button.

BorderStyle

Border

Specifies the border style of the Form.

AutoCenter

Center

Specifies whether the Form is automatically centered in the main Visual FoxPro window the first time it is displayed.

Icon

Window Icon

Specifies the icon displayed for a Form at run time when the Form is minimized.


Form Events

Visual FoxPro Form Event

FoxPro 2.x Equivalent

Functionality

Load

#SECTION 2 Setup Code

Occurs just before the Form is created.

Unload

Cleanup Code

Occurs when the Form is released.


Form Variable Scoping

Variables created in the Form Load event are scoped to the Form and visible to the FormSet, its Forms and controls when a FormSet with WindowType = 2 or 3 exists. Variables created in other Form events (or methods) will only be visible as specified (i.e. PRIVATE, PUBLIC or LOCAL).