This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Framework > ESRI.ArcGIS.Framework > Interfaces > IC > ICommandBar Interface > ICommandBar.CreateMenu Method (ArcObjects .NET 10.5 SDK) |
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 );
Optional Values
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]
If you want to create a new menu in a development environment other than VBA, you should implement IMenuDef instead of using ICommandBar::CreateMenu.