MenuCommandService.GlobalInvoke Method (CommandID, Object)

 

Invokes the given command with the given parameter on the local form or in the global environment.

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

public virtual bool GlobalInvoke(
	CommandID commandId,
	object arg
)

Parameters

commandId
Type: System.ComponentModel.Design.CommandID

The command to invoke.

arg
Type: System.Object

A parameter for the invocation.

Return Value

Type: System.Boolean

true, if the command was found; otherwise, false.

The local form is first searched for the given command ID. If it is found, it is invoked. Otherwise, the command ID is passed to the global environment command handler, if one is available.

.NET Framework
Available since 2.0
Return to top
Show: