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