Visual Basic Reference

Menu Editor Dialog Box

See Also    Specifics

Allows you to create custom menus for your application and to define their properties.

Dialog Box Options

Caption

Allows you to enter the menu or command name that you want to appear on your menu bar or in a menu.

If you want to create a separator bar in your menu, type a single hyphen (-) in the Caption box.

To give the user keyboard access to a menu item, insert an ampersand (&) before a letter. At run time, this letter is underlined (the ampersand is not visible), and the user can access the menu or command by pressing ALT and the letter. If you need an ampersand to show in the menu, put two consecutive ampersands in the caption.

Name

Allows you to enter a control name for the menu item. A control name is an identifier used only to access the menu item in code; it doesn't appear in a menu.

Index

Allows you to assign a numeric value that determines the control's position within a control array. This position isn't related to the screen position.

Shortcut

Allows you to select a shortcut key for each command.

HelpContextID

Allows you to assign a unique numeric value for the context ID. This value is used to find the appropriate Help topic in the Help file identified by the HelpFile property.

NegotiatePosition

Allows you to select the menu's NegotiatePosition property. This property determines whether and how the menu appears in a container form.

Checked

Allows you to have a check mark appear initially at the left of a menu item. It is generally used to indicate whether a toggle option is turned on or off.

Enabled

Allows you to select whether you want the menu item to respond to events, or clear if you want the item to be unavailable and appear dimmed.

Visible

Allows you to have the menu item appear on the menu.

WindowList

Determines if the menu control contains a list of open MDI child forms in an MDI application.

   Right Arrow

Moves the selected menu down one level each time you click it. You can create up to four levels of submenus.

   Left Arrow

Moves the selected menu up one level each time you click it. You can create up to four levels of submenus.

   Up Arrow

Moves the selected menu item up one position within the same menu level each time you click it.

   Down Arrow

Moves the selected menu item down one position within the same menu level each time you click it.

Menu List

A list box that displays a hierarchical list of menu items. Submenu items are indented to indicate their hierarchical position or level.

Next

Moves selection to the next line.

Insert

Inserts a line in the list box above the currently selected line

Delete

Deletes the currently selected line.

OK

Closes the Menu Editor and applies all changes to the last form you selected. The menu is available at design time, but selecting a menu at design time opens the Code window for that menu's Click event rather than executing any event code.

Cancel

Closes the Menu Editor and cancels all changes.