Compartir a través de


CREATE FORM Command

Opens the Form designer.

CREATE FORM [FormName | ?] [AS cClassName FROM cClassLibraryName | ?]
   [NOWAIT] [SAVE] [DEFAULT] [[WINDOW WindowName1] [IN [WINDOW]
      WindowName2 | IN SCREEN]]

Parameters

  • FormName
    Specifies the file name for the form. If you don't specify an extension for the file name, Visual FoxPro automatically assigns an .scx extension. If a form file with the name you specify already exists, you are asked if you want to overwrite the existing file (if SET SAFETY is set to ON).

  • ?
    Displays the Create dialog box from which you can choose a form or enter the name of a new form to create.

  • AS cClassName FROM cClassLibraryName | ?
    Creates a new form from a form class in a .vcx visual class library. cClassName specifies the name of the user-defined form class from which the new form is created. An error is generated if cClassName isn't based on a form. cClassLibraryName specifies the name of the .vcx visual class library containing the form class specified with cClassName. Include ? to display the Open dialog box, allowing you to specify the visual class library.

  • NOWAIT
    Continues program execution after the Form designer has been opened. The program doesn't wait for the Form designer to be closed, but continues execution on the program line immediately following the line that contains CREATE FORM NOWAIT. If you omit NOWAIT, when CREATE FORM is issued in a program, the Form designer is opened and program execution pauses until the Form designer is closed.

    Including NOWAIT has no effect on CREATE FORM when it is issued in the Command window.

  • SAVE
    When issued in a program, leaves the Form designer open after another window is brought forward. Including the SAVE option has no effect when issued from the Command window.

  • DEFAULT
    Specifies that the Form designer is opened with the default Visual FoxPro form template, overriding a default form template specified on the Forms tab of the Options dialog.

    For additional information about form templates, see Creating Forms .

  • WINDOW WindowName1
    Specifies a window whose characteristics the Form designer takes on. For example, if the window is created with the FLOAT option of DEFINE WINDOW, the Form designer can be moved. The window need not be active or visible, but it must be defined.

    The Form designer has a default size that can be larger than the window from which it takes its characteristics. In this case, the Form designer still assumes the characteristics of the window in which it is placed. The upper-left corner of the Form designer is placed at the same coordinates as the upper-left corner of the window, and extends beyond the window's borders.

  • IN [WINDOW] WindowName2
    Specifies a parent window in which the Form designer is opened. The Form designer doesn't assume the characteristics of the parent window and cannot be moved outside the parent window. If the parent window is moved, the Form designer moves with it.

    The parent window must first be defined with DEFINE WINDOW, and must be visible, to access the Form designer.

  • IN SCREEN
    Specifies that the Form designer is explicitly opened in the main Visual FoxPro window, after the Form designer has been placed in a parent window. The Form designer is placed in a parent window by including the IN WINDOW clause.

Remarks

Issuing CREATE FORM without any additional arguments opens a new form in the Form designer. When you exit the Form designer, you are prompted to save the form with a different name.

See Also

_BROWSER | COMPILE FORM | DO FORM | GETPEM( ) | _INCLUDE | MODIFY FORM | PEMSTATUS( ) | Session Object | SYS(1269) - Property Information | SYS(1270) - Object Location | SYS(1271) - Object's .SCX File | SYS(1272) - Object Hierarchy