IMenuCommandService.GlobalInvoke Method (CommandID)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Invokes a menu or designer verb command matching the specified command ID.

Namespace:   System.ComponentModel.Design
Assembly:  System (in System.dll)

bool GlobalInvoke(
	CommandID commandID


Type: System.ComponentModel.Design.CommandID

The CommandID of the command to search for and execute.

Return Value

Type: System.Boolean

true if the command was found and invoked successfully; otherwise, false.

This method searches for a menu command or designer verb with a CommandID matching the specified CommandID. This method first searches within the designer verbs collection consisting of global and active designer-provided verbs before continuing the search, if necessary, through the global environment command service. If a matching menu command or designer verb is located, the command is invoked.

.NET Framework
Available since 1.1
Return to top