Visual Basic Reference

Visual Studio 6.0

DoVerb Method

See Also    Example    Applies To

Opens an object for an operation, such as editing. Doesn't support named arguments.

Syntax

object.DoVerb (verb)

The DoVerb method syntax has these parts:

Part Description
Object An object expression that evaluates to an object in the Applies To list.
Verb Optional. The verb to execute of the object within the OLE container control. If not specified, the default verb is executed. The value of this argument can be one of the standard verbs supported by all objects or an index of the ObjectVerbs property array.

Remarks

If you set the AutoActivate property to 2 (Double-Click), the OLE container control automatically activates the current object when the user double-clicks the control.

Each object can support its own set of verbs. The following values represent standard verbs every object should support:

Constant Value Description
VbOLEPrimary 0 The default action for the object.
VbOLEShow -1 Activates the object for editing. If the application that created the object supports in-place activation, the object is activated within the OLE container control.
VbOLEOpen -2 Opens the object in a separate application window. If the application that created the object supports in-place activation, the object is activated in its own window.
VbOLEHide -3 For embedded objects, hides the application that created the object.
VbOLEUIActivate -4 If the object supports in-place activation, activates the object for in-place activation and shows any user interface tools. If the object doesn't support in-place activation, the object doesn't activate, and an error occurs.
VbOLEInPlaceActivate -5 If the user moves the focus to the OLE container control, creates a window for the object and prepares the object to be edited. An error occurs if the object doesn't support activation on a single mouse click.
VbOLEDiscardUndoState -6 Used when the object is activated for editing to discard all record of changes that the object's application can undo.

Note   These verbs may not be listed in the ObjectVerbs property array.

Show: