This documentation is archived and is not being maintained.

IMenuCommandService.GlobalInvoke Method

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
boolean GlobalInvoke (
	CommandID commandID
function GlobalInvoke (
	commandID : CommandID
) : boolean
Not applicable.



The CommandID of the command to search for and execute.

Return Value

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.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0