Skip to main content
Visual Components are implemented in FRE for Windows.
This object provides access to the commands of a Visual Component. These commands can appear in the context menu of a component and in its toolbar (if exists). You can enable or disable commands and add custom commands for Visual Components. See Customizing the Context Menu and Toolbar of a Visual Component or details. The following Visual Components allow you to manage their commands: ImageViewer, ZoomViewer, DocumentViewer, TextEditor. See the list of available commands and the ways these commands can be used in each component: The information about executing commands is reported through a special outgoing interfaces. These interfaces are ICommandEvents (for C++) and a dispinterface DICommandEvents (for Visual Basic). It’s worth noting that Visual Basic users should not care for details of event interfaces implementation as this development platform provides easy means for handling them. This object may be declared WithEvents in Visual Basic. For C++ user this fact means that it supports the IConnectionPointContainer interface. To receive notification events, a C++ user should create an object derived from the ICommandEvents interface, then set up the connection between it and events source implemented in Commands object by standard COM means.

Properties

NameTypeDescription
Countint, read-onlyRetrieves a number of commands available in the Visual Component.
ElementMenuItemEnum, read-onlyReturns the identifier of the command with the specified index.

Methods

NameDescription
DisableCommandDisables the specified command.
DoCommandExecutes the specified command in synchronous or asynchronous mode.
EnableCommandEnables the specified command.
HasHotKeySpecifies whether the hot key is used by some command.
IsUserCommandRegisteredSpecifies whether the specified user-defined command is registered.
RegisterUserCommandRegisters a user-defined command.
UnregisterUserCommandCancels the registration of the specified user-defined command.

Samples

This object is used in the following code samples: VisualComponents.

See also

IImageViewer::Commands IZoomViewer::Commands IDocumentViewer::Commands ITextEditor::Commands ICommandEvents Customizing the Context Menu and Toolbar of a Visual Component