Export (0) Print
Expand All

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft