COM Verb

A COM Verb object represents a COM verb registration or unregistration. It is used to define commands that the parent COM Class handles if the COM object resides in a COM-aware container. Registration or unregistration of a COM verb is controlled by its component and its parent COM class.

Situation InstallMate
Not linked to a component The COM verb is registered if its parent COM class is registered.
Linked to a component The COM class is registered if its component is installed*, or if its parent COM class is registered.

*This may cause the parent COM class to be registered.

See COM classes for more information.

Tip: Many DLL-based COM servers have a DllRegisterServer entry point that will register the COM class(es) implemented by the server. If your COM server implements that entry point, you might find it more convenient to register the COM server by specifying Use DllRegisterServer in the file's Registration attribute. In that case, you don't need to register the COM class or its servers and verbs separately.

Attributes

The following attributes and options are available.

Attribute Description
Verb type

Select the verb type from the drop-down list. The following choices are available:

Verb type Value Description
Custom 1..n Executes a control-specific action.
Primary 0 Defines the default action, which is executed when the user double-clicks the object in its container.
Open -2 Opens the object in a separate editing window.
Show -1 Shows the object for editing or viewing.
Hide -3 Hides the object's in-place user interface.
UI Activate -4 Activates the object in-place, i.e., inside its container, with all its user interface adornments (menus, toolbars, etc.).
Inplace Activate -5 Activates the object in-place, i.e., inside its container, but without its user interface adornments.
Discard Undo State -6 Discards the undo state of the object, without deactivating it.
Menu state

Select the state of the verb on the object's context menu from the drop-down list. The following choices are available:

Menu state Description
Enabled The verb's menu item is enabled.
Grayed The verb's menu item is disabled and grayed out.
Disabled The verb's menu item is disabled, but not grayed out.
Menu text Enter the name for the verb as it will appear on the object's context menu in a COM-aware container application. You can use an ampersand ('&') prefix to designate a keyboard accelerator.
Checked Check this box to display a check mark in front of the verb on the context menu; clear it to omit the check mark.
Read-only Check this box to indicate that the verb will not modify its object (and can therefore be used for read-only objects); clear it if the verb may modify the object.
On container menu Check this box to make the verb appear on the object's context menu; clear it to omit it from the context menu. The Verb types Open, Show, and Hide should have this box cleared.

Related topics

COM classes, Working with attribute panes