Compartir a través de


How to: Specify a Form Type

You create all types of forms in much the same way, but you set specific properties to indicate how the form should behave.

If you're creating a child form, you specify not only that it should appear inside another form, but also whether it is an MDI-compliant child form, which indicates how the form behaves when maximized. If the child form is MDI-compliant, it combines with the parent form, sharing the parent form's title bar and caption, menus, and toolbars. A child form that is not MDI-compliant maximizes into the full client area of the parent, but retains its own caption and title bar.

To specify a child form

  1. Create or edit the form using the Form Designer.

  2. Set the form's ShowWindow property to one of the following values:

    • 0  In Screen. The child form's parent will be the main Visual FoxPro window.

    • 1  In Top-Level Form. The child form's parent will be the top-level form that is active when the child window is displayed. Use this setting if you want the child window to appear inside any top-level window other than the main Visual FoxPro window.

  3. Set the form's MDIForm property to .T. (true) if you want the child form to be combined with the parent when maximized, or to .F. (false) if the child window should be retained as a separate window when maximized.

A floating form is a variation of a child form.

To specify a floating form

  1. Create or edit the form using the Form Designer.

  2. Set the form's ShowWindow property to one of the following values:

    • 0  In Screen. The floating form's parent will be the main Visual FoxPro window.

    • 1  In Top-Level Form. The floating form's parent will be the top-level form that is active when the floating window is displayed.

  3. Set the form's Desktop property to .T. (true).

To specify a top-level form

  1. Create or edit the form using the Form Designer.

  2. Set the form's ShowWindow property to 2  As Top-Level Form.

See Also

Tasks

How to: Display a Child Form Inside a Top-Level Form

How to: Hide the Main Visual FoxPro Window

How to: Add a Menu to a Top-Level Form

Concepts

Creation of Single- and Multiple-Document Interfaces

Other Resources

Creating Forms