This document is archived and information here might be outdated.  Recommended version.


ICommandBar.CreateMenu Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Framework)  

ICommandBar.CreateMenu Method

Creates a new blank menu on this commandbar at the specified position.

[Visual Basic .NET]
Public Function CreateMenu ( _
    ByVal Name As String, _
    [ByRef Index As Object] _
) As ICommandBar
[C#]
public ICommandBar CreateMenu (
    string Name,
    ref object Index
);
[C#]

Optional Values

Index   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.

Product Availability

Available with ArcGIS Desktop.

Description

 

Name is a string representing the caption of the menu. The caption is the string that appears for the menu when it is placed on a commandbar.

Index is a number representing the index location at which this menu is to appear on the commandbar. [Optional]

 

Remarks

If you want to create a new menu in a development environment other than VBA, you should implement IMenuDef instead of using ICommandBar::CreateMenu.

See Also

ICommandBar Interface