DblClick Event
Object List Next Object
Defined By: ButtonGadget
Description:
Occurs when the user presses and releases a mouse button twice in rapid
succession over an object.
Usage:
Sub DblClick ()
Details:
Double-clicking on a disabled control or an empty area of a form triggers the
DbleClick event for a form. For a control, the event occurs when the user
double-clicks the control or a list item of a ListBox, ComboBox (with a Style of 1-
simplecombo), or FileListBox.
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 DblClick 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 so that you can take different actions.
See Also:
Click event, MouseDown event, MouseUp event