Property: MainMenu as Command (read-only)
Dispatch Id: 1003
This property provides information about the structure and commands available in the MapForceControl main menu, as a Command object. The Command object contains all available submenus of MapForce (for example "File", "Edit", "View" etc.). To access the submenu objects, use the SubCommands property of the MainMenu property. Each submenu is also a Command object. For each submenu, you can then further iterate through their SubCommands property in order to get their corresponding child commands and separators (this technique may be used, for example, to create the application menu programmatically). Note that some menu commands act as containers ("parents") for other menu commands, in which case they also have a SubCommands property. To get the structure of all menu commands programmatically, you will need a recursive function, as illustrated for C# in Retrieving Command Information.
public void GetMapForceMenus()