Redigeeri

Jagamisviis:


MenuCommandService.GlobalInvoke Method

Definition

Invokes a command on the local form or in the global environment.

Overloads

GlobalInvoke(CommandID)

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

GlobalInvoke(CommandID, Object)

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

GlobalInvoke(CommandID)

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

public:
 virtual bool GlobalInvoke(System::ComponentModel::Design::CommandID ^ commandID);
public virtual bool GlobalInvoke (System.ComponentModel.Design.CommandID commandID);
abstract member GlobalInvoke : System.ComponentModel.Design.CommandID -> bool
override this.GlobalInvoke : System.ComponentModel.Design.CommandID -> bool
Public Overridable Function GlobalInvoke (commandID As CommandID) As Boolean

Parameters

commandID
CommandID

The command to invoke.

Returns

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

Implements

Remarks

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.

See also

Applies to

GlobalInvoke(CommandID, Object)

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

public:
 virtual bool GlobalInvoke(System::ComponentModel::Design::CommandID ^ commandId, System::Object ^ arg);
public virtual bool GlobalInvoke (System.ComponentModel.Design.CommandID commandId, object arg);
abstract member GlobalInvoke : System.ComponentModel.Design.CommandID * obj -> bool
override this.GlobalInvoke : System.ComponentModel.Design.CommandID * obj -> bool
Public Overridable Function GlobalInvoke (commandId As CommandID, arg As Object) As Boolean

Parameters

commandId
CommandID

The command to invoke.

arg
Object

A parameter for the invocation.

Returns

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

Remarks

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.

See also

Applies to