Event fired when the user double-clicks a form or an object.

Parameters

<flags expN>

A single-byte value that tells you which other keys and mouse buttons were pressed when the user double-clicked the button.

<col expN>

The horizontal position of the mouse when the user double-clicked the button.

<row expN>

The vertical position of the mouse when the user double-clicked the button.

Property of

Most form objects

Description

Use onLeftDblClick to perform an action when the user double-clicks with the left mouse button. onLeftDblClick can also trap Shift, Ctrl, middle mouse button, or right mouse button presses if they occur at the same time the user double-clicks the button.

You can test the state of multiple keys that have been pressed simultaneously. The state of each of the three mouse buttons and the Shift and Ctrl keys is stored in a separate bit in the <flags expN> parameter, as follows:

Bit number

Flag for

0

Left mouse button

1

Right mouse button

2

Shift

3

Ctrl

4

Middle mouse button

To check if the key or button was down, use the BITSET( ) function with the <flags expN> as the first parameter, and corresponding the bit number as the second parameter. BITSET( ) will return true if the key or button was down, and false if it was not.

The <col expN> and <row expN> parameters contain values that are relative to the object that fired the event. For example, the upper left corner of a button is always row 0, column 0, even if that button is in the bottom corner of the form.

All other onLeft-, onRight-, and onMiddle- mouse events operate in the same way, and receive the same parameters.

When you double-click a button, its button events fire in the following order:

  1. mouse down