Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Futurebasic/Language/Reference/on mouse

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

ON MOUSE Statement (+) Appearance (+) Standard <td width="16"> Console Syntax ON MOUSE {FN userFunction|GOSUB{lineNumber|"stmtLabel"}} Description This statement designates a particular function or subroutine as a mouse-event handling routine. A mouse-event handling routine is called in response to a mouseclick which occurs inside the content region of the currently active window (but not inside any buttons, scrollbars, edit fields nor picture fields). After such a mouseclick occurs, FB does not call your designated routine immediately. Instead, your program continues executing until a HANDLEEVENTS statement is reached. At that time, HANDLEEVENTS will call your designated routine once for each mouseclick event that occurred; your designated routine should examine the MOUSE <event> functions to get information about the event. Note: If you use the ON MOUSE FN userFunction syntax, then userFunction must refer to a function which was defined or prototyped at an earlier location in the source code. Your mouse-event handling function should not take any parameters, nor return a result. If your program does not use HANDLEEVENTS, you can use the MOUSE(_down), MOUSE(_lastMVert), MOUSE(_lastMHorz) and many other position functions (outlined in the FB Mouse Group of the constants document) to track mouse activity. See Also MOUSE <event> MOUSE(_down); MOUSE <position> HANDLEEVENTS