ArcObjects Library Reference  (SystemUI)    

ICommand.OnClick Method

Occurs when this command is clicked.

[Visual Basic 6.0]
Sub OnClick
[Visual Basic .NET]
Public Sub OnClick ( _
)
[C#]
public void OnClick (
);
[Java]
public void onClick (
)
throws
    IOException,
    AutomationException
[C++]
HRESULT OnClick(
void
);

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

When implementing ICommand to create a custom command, write the code that performs the action when the command is clicked in the OnClick method.

[Visual Basic 6.0]
Private Sub ICommand_OnClick()
  '  In this example, a message box is displayed.
  MsgBox "Clicked on my command"
End Sub 

See Also

ICommand Interface

Example

ICommand Example

 


Feedback Send feedback on this page