![]() |
<< Index >> |
FutureBasic 5 |
mouse <event> | function | |
|
clickType = mouse(0)
locationInfo = mouse(locationType)
on mouse
statement, then the mouse <event>
functions return information about a mouse click event. Your mouse-event handling routine should check the mouse(0)
function, and possibly the mouse(locationType)
functions, each time your routine is called.mouse <event>
functions will not report a mouse click that occurs inside an active control (such as a button or scrollbar), or in an edit field or picture field, or anywhere outside the active window's content region. Such mouse clicks are handled by other routines, such as your dialog-event handling routine (see the dialog function), or your menu-event handling routine (see the menu function).mouse(0)
function indicates whether a single, double or triple-click occurred. It will usually return one of the following values:Mouse(0) | Description |
_click1nDrag (-1) | single click, and mouse is still down. |
_click2nDrag (-2) | double click, and mouse is still down. |
_click3nDrag (-3) | triple click, and mouse is still down. |
HandleEvents
. In that case, mouse(0)
may return one of the following values:Mouse(0) | Description |
_click1 (1) | single click, and mouse is already released. |
_click2 (2) | double click, and mouse is already released. |
_click3 (3) | triple click, and mouse is already released. |
abs(mouse(0))
, which will always return 1, 2 or 3.mouse(_lastMHorz)
and mouse(_lastMVert)
functions within your mouse-event handling routine. The values returned by mouse(_lastMHorz)
and mouse(_lastMVert)
are usually the same as those returned by mouse(_horz)
and mouse(_vert)
(see the mouse <position> functions), but they may be different, especially if the mouse is being moved quickly.mouse(0)
returns a positive value (indicating that the mouse was both clicked and released before your mouse-event handling routine was called), then you may also be interested in the values returned by mouse(_releaseHorz)
and mouse(_releaseVert)
. These values tell you where the mouse pointer was at the instant the mouse button was released. If mouse(0)
returned a negative value, then mouse(_releaseHorz)
and mouse(releaseVert)
are meaningless.wndNum = mouse(_mouseWindow)
fn STILLDOWN
to determine when the user releases the mouse button.