Eigenschaft: Toolbars als Commands (schreibgeschützt)
 
Dispatch Id: 1005
 
Beschreibung:
Diese Eigenschaft enthält Informationen über die Struktur von MapForceControl-Symbolleisten, als  Command-Objekt. Das Command-Objekt enthält alle verfügbaren Symbolleisten von MapForce. Verwenden Sie die Eigenschaft SubCommands der Eigenschaft Toolbars, um die Symbolleisten abzurufen. Jede Symbolleiste ist ebenfalls ein Command-Objekt. Sie können bei jeder Symbolleiste weiter durch deren SubCommands-Eigenschaft iterieren, um deren Befehle abzurufen  (Auf diese Art können Sie z.B. die Symbolleisten der Applikation programmatisch erstellen).
 
 
public void GetMapForceToolbars() {     // Get the application toolbars from the MapForce ActiveX control assigned to the current form            MapForceControlLib.MapForceCommands toolbars = this.axMapForceControl1.Toolbars;       // Iterate through all toolbars        for (int i = 0; i < toolbars.Count; i++)     {       MapForceControlLib.MapForceCommand toolbar = toolbars[i];       Console.WriteLine();       Console.WriteLine("The toolbar \"{0}\" has the following commands:", toolbar.Label);         // Iterate through all commands of this toolbar       for (int j = 0; j < toolbar.SubCommands.Count; j++)       {          MapForceControlLib.MapForceCommand cmd = toolbar.SubCommands[j];          // Output only command objects that are not separators          if (!cmd.IsSeparator)          {             Console.WriteLine("{0}, {1}, {2}", cmd.ID, cmd.Name, cmd.Label.Replace("&", ""));          }       }     } }  | 
C# example