> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ICommandEvents Interface

> ICommandEvents interface in ABBYY FineReader Engine Visual Components on Windows — This is a callback interface that is used for reporting events from the Commands object to the listeners.

<Warning>
  Visual Components are implemented in FRE for Windows.
</Warning>

This is a callback interface that is used for reporting events from the [Commands](/fine-reader/engine/visual-components-reference/supplementary-objects/commands) object to the listeners. This interface is implemented on the client-side. See the detailed implementation advice for your development tool in [Working with Connectable Objects](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-connectable-objects).

This interface allows you to handle execution of the basic commands and define actions on custom commands. See [Customizing the Context Menu and Toolbar of a Visual Component](/fine-reader/engine/guided-tour/advanced-techniques/using-gui-elements/customizing-the-context-menu-and-toolbar-of-a-visual-component) for details.

## Methods

| Name                                                                                                               | Description                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [OnCommand](/fine-reader/engine/visual-components-reference/supplementary-objects/icommandevents/oncommand-method) | Called before executing a command in a Visual Component. Delivers to the client information on the command which is going to be executed. Allows you to cancel the operation. |

## See also

[Working with Connectable Objects](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-connectable-objects)

[Customizing the Context Menu and Toolbar of a Visual Component](/fine-reader/engine/guided-tour/advanced-techniques/using-gui-elements/customizing-the-context-menu-and-toolbar-of-a-visual-component)

[Commands](/fine-reader/engine/visual-components-reference/supplementary-objects/commands)
