> ## 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.

# Commands オブジェクト（ICommands インターフェイス）

> Windows 上の ABBYY FineReader Engine Visual Components の Commands オブジェクト（ICommands インターフェイス）— このオブジェクトは、Visual Component のコマンドにアクセスするためのものです。

<Warning>
  Visual Components は Windows 版 FRE に実装されています。
</Warning>

このオブジェクトは、Visual Component のコマンドへのアクセスを提供します。これらのコマンドは、コンポーネントのコンテキストメニューやツールバー (存在する場合) に表示できます。また、コマンドの有効化や無効化、Visual Components へのカスタムコマンドの追加も可能です。詳細については、[Visual Component のコンテキストメニューとツールバーのカスタマイズ](/ja/fine-reader/engine/guided-tour/advanced-techniques/using-gui-elements/customizing-the-context-menu-and-toolbar-of-a-visual-component)を参照してください。

次の Visual Components では、コマンドを管理できます：[ImageViewer](/ja/fine-reader/engine/visual-components-reference/imageviewer)、[ZoomViewer](/ja/fine-reader/engine/visual-components-reference/zoomviewer)、[DocumentViewer](/ja/fine-reader/engine/visual-components-reference/documentviewer)、[TextEditor](/ja/fine-reader/engine/visual-components-reference/texteditor)。使用可能なコマンドの一覧と、各コンポーネントでのコマンドの使い方については、以下を参照してください。

* [Image Viewer のコマンド](/ja/fine-reader/engine/visual-components-reference/imageviewer/image-viewer-commands)
* [Zoom Viewer のコマンド](/ja/fine-reader/engine/visual-components-reference/zoomviewer/zoom-viewer-commands)
* [Document Viewer のコマンド](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands)
* [Text Editor のコマンド](/ja/fine-reader/engine/visual-components-reference/texteditor/text-editor-commands)

コマンドの実行に関する情報は、特別な出力インターフェイスを通じて通知されます。これらのインターフェイスは、[ICommandEvents](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/icommandevents) (C++ 用) および dispinterface の [DICommandEvents](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/icommandevents) (Visual Basic 用) です。

Visual Basic ユーザーは、この開発プラットフォームにイベント処理を簡単に扱うための手段が用意されているため、イベントインターフェイス実装の詳細を意識する必要はありません。このオブジェクトは、Visual Basic では WithEvents として宣言できます。

C++ ユーザーにとって、これは IConnectionPointContainer インターフェイスをサポートしていることを意味します。イベント通知を受け取るには、C++ ユーザーは ICommandEvents インターフェイスから派生したオブジェクトを作成し、標準の COM の方法で、そのオブジェクトと Commands オブジェクトに実装されたイベントソースとの接続を設定する必要があります。

<div id="properties">
  ## プロパティ
</div>

| 名前                                                                                                            | 型                                                                                                                 | 説明                                   |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| Count                                                                                                         | [int](/ja/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties), 読み取り専用 | Visual Component で使用できるコマンドの数を取得します。 |
| [Element](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/element-property) | [MenuItemEnum](/ja/fine-reader/engine/visual-components-reference/enumerations/menuitemenum), 読み取り専用              | 指定したインデックスのコマンド識別子を返します。             |

<div id="methods">
  ## メソッド
</div>

| 名前                                                                                                                                          | 説明                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| [DisableCommand](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/disablecommand-method)                   | 指定されたコマンドを無効にします。                   |
| [DoCommand](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/docommand-method)                             | 指定されたコマンドを同期モードまたは非同期モードで実行します。     |
| [EnableCommand](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/enablecommand-method)                     | 指定されたコマンドを有効にします。                   |
| [HasHotKey](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/hashotkey-method)                             | そのホットキーがいずれかのコマンドで使用されているかどうかを示します。 |
| [IsUserCommandRegistered](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/isusercommandregistered-method) | 指定されたユーザー定義コマンドが登録されているかどうかを示します。   |
| [RegisterUserCommand](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/registerusercommand-method)         | ユーザー定義コマンドを登録します。                   |
| [UnregisterUserCommand](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/unregisterusercommand-method)     | 指定されたユーザー定義コマンドの登録を解除します。           |

<div id="samples">
  ## サンプル
</div>

このオブジェクトは、以下のコードサンプルで使用されています：[VisualComponents](/ja/fine-reader/engine/guided-tour/samples#visualcomponents)。

<div id="see-also">
  ## 関連項目
</div>

[IImageViewer::Commands](/ja/fine-reader/engine/visual-components-reference/imageviewer#commands)

[IZoomViewer::Commands](/ja/fine-reader/engine/visual-components-reference/zoomviewer#commands)

[IDocumentViewer::Commands](/ja/fine-reader/engine/visual-components-reference/documentviewer#commands)

[ITextEditor::Commands](/ja/fine-reader/engine/visual-components-reference/texteditor#commands)

[ICommandEvents](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/icommandevents)

[Visual Componentのコンテキストメニューとツールバーのカスタマイズ](/ja/fine-reader/engine/guided-tour/advanced-techniques/using-gui-elements/customizing-the-context-menu-and-toolbar-of-a-visual-component)
