DblClick Event

Object List Next Object

Defined By:
Form

Description:

Occurs when the user presses and releases a mouse button twice in rapid succession over an object.

Usage:

Sub DblClick ()

Details:

For a form, the DblClick event occurs when the user double-clicks a disabled control or an empty area of a form. For a control, the event occurs when the user double-clicks the control or a list item of a simple combo box (Style = 1), list box, or file list box.

You can use a DblClick event procedure to initiate some action, such as double-clicking an icon to display a particular dialog box. Another common way to use the double-click event is as an action-extension to a click event. Every object that receives a double-click event also receives a click event prior to the double-click, so your application can interpret the double-click as
the user has clicked this item to select it already, and now wants to act on it. This is typical behavior for list boxes on dialogs, where a click selects the list item (and possibly does more work in the Click event handler) and the double-click invokes the default response for the dialog.

The time limit during which a double-click must be received (also referred to as the double-click speed) may vary depending on the related Control Panel setting. If the double-click does not occur within the allotted time, two separate Click events occur.

Similar to Click events, the
button argument to the MouseDown and MouseUp events can be used to identify which of the mouse buttons is pressed to take differing actions.

See Also:

Click event; MouseDown, MouseUp events