Partager via


CREATE MENU Command

Opens the Menu designer in Visual FoxPro.

CREATE MENU [FileName | ?] [NOWAIT] [SAVE] [WINDOW WindowName1]
   [IN [WINDOW] WindowName2 | IN SCREEN

Parameters

  • FileName
    Specifies the file name for the menu table. If you don't specify an extension for the file name, Visual FoxPro automatically assigns an .mnx extension.

  • ?
    Displays the Create dialog box that prompts you to name the menu being created.

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

    If you issue CREATE MENU from the Command window and include NOWAIT, the New Menu dialog is not displayed. The New Menu dialog lets you specify the type of menu (standard or shortcut) created.

  • SAVE
    Leaves the Menu designer open after another window is activated. If you omit SAVE, the Menu designer is closed when another window is activated. Including SAVE has no effect when issued from the Command window.

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

    The Menu designer has a default size that can be larger than the window from which it takes its characteristics. In this case, the Menu designer still assumes the characteristics of the window in which it is placed. The upper-left corner of the Menu 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 Menu designer is opened. The Menu 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 Menu designer moves with it.

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

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

Remarks

Issuing CREATE MENU without any additional arguments opens the Menu designer within which you can define a menu system. The name MENU1 is temporarily assigned to the menu definition table. When you exit the Menu designer, you can save the menu definition under a different name.

See Also

DEFINE MENU | MODIFY MENU | Menu Designer | Designing Menus and Toolbars