_MENUDESIGNER System Variable

JavaScript Editor js editor     Web development 



Main Page

Specifies an external application for creating menus.

_MENUDESIGNER = cProgramName

Parameters

cProgramName


Specifies the file name for the external menu designer. If the application is in a directory other than the current default directory, include the path with the application name. You can also specify the application in your Visual FoxPro Config.fpw configuration file by including a line using this syntax:
В Copy Code
_MENUDESIGNER = cProgramName
If _MENUDESIGNER contains the default empty string, the Visual FoxPro menu designer is opened.

Remarks

The application specified in _MENUDESIGNER runs during an interactive design-time Visual FoxPro session. The application is executed when you choose Menu from the New Dialog Box, new Menu from the Project Manager, execute CREATE MENU, MODIFY MENU, or EDITSOURCE(В ) in the Command window or a program, or call the Modify method for a file object accessed via a ProjectHook object.

Note:
When an external menu designer runs, the menu items normally associated with the Visual FoxPro designers are not available.

An external menu designer must include a PARAMETERS statement to accept three parameters that Visual FoxPro passes to the application.

Parameter Description

cFileName

A character type parameter that contains the file name of the menu to be opened in the menu design application.

If CREATE MENUmenuname is issued to run the menu designer, cFileName contains the menuname with a fully qualified path to the file's location.

If CREATE MENU is issued without a menuname, the New Menu dialog box is displayed. After the user chooses a Menu or Shortcut Menu option, the menu design application is run and cFileName contains an internally generated menu name Menu1, Menu2, and so on. The menu name is incremented each time CREATE MENU is issued without a menuname.

If CREATE MENU ? is issued to run the menu design application, a dialog box is displayed allowing the user to specify a menu name. When the user enters a menu name and chooses Save, the NewMenu dialog box is displayed. After the user chooses a Menu or Shortcut Menu option, cFileName contains the user's menu name with a fully qualified path to the file's location.

nCommandType

A numeric type parameter that indicates the how the menu design application was invoked.

nCommandType Description

1

The Menu option was chosen in the New Menu dialog box.

2

The Shortcut option was chosen in the New Menu dialog box.

3

The MODIFY MENU command was used to invoke the menu design application.

The cFileName parameter contains the name of the menu specified in MODIFY MENU with a fully qualified path to the file's location.

aDetail

An array with additional information about the command that invoked the menu design application.

An array is only created if the menu design application is invoked by choosing new Menu from the Project Manager, or by issuing CREATE MENU or MODIFY MENU with the optional NOWAIT, SAVE, WINDOW or IN clauses.

When no array is created, the third parameter is a memory variable containing a logical false (.F.).

When the menu design application is invoked by choosing new Menu from the Project Manager, a two element array is created. The first element of the array contains "PROJECT." The second element contains the name of the project with a fully qualified path to the file's location.

When the menu design application is invoked by issuing CREATE MENU or MODIFY MENU with the optional NOWAIT, SAVE, WINDOW or IN clauses, the array contains a row for each clause. Each row in the array has two elements.

The following table describes the contents of each of the two elements.

1st Element 2nd Element

NOWAIT

Contains a logical true (.T.).

SAVE

Contains a logical true (.T.).

WINDOW

Contains the name of the window specified in the WINDOW clause.

IN

Contains SCREEN or the name of the specified window.

The external menu designer should return a logical true (.T.) if the application successfully creates the user's menu. If a logical false (.F.) is returned, the Visual FoxPro Menu Designer is opened.

See Also



JavaScript Editor js editor     Web development