Function SetMouse() Foundation
Turns mouse on or off.
SetMouse( [<lOnOff>] ) --> lMouseOn
The return value of SetMouse() is a logical value which identifies the condition of the mouse prior to this call to SetMouse(). If it is .T. (true) the mouse was turned on, .F. (false) means it was turned off.
The environment function SetMouse() turns on or off the recognition of mouse events. If a program is running in character mode, the mouse pointer is also turned on or off. When the program is running in graphic mode, either as a VIO application in a window or as a Presentation Manager application, the mouse pointer cannot be turned off. A call to SetMouse(.F.) simply causes the function AppEvent() to stop registering mouse events.
Mouse events are coded as numeric values. To easily process them within a program, #define constants are defined for all events in the #include file Appevent.ch. The most important constants are presented in the following table:
|xbeM_LbDown||Left mouse button pressed|
|xbeM_RbDown||Right mouse button pressed|
|xbeM_LbUp||Left mouse button released|
|xbeM_RbUp||Right mouse button released|
|xbeM_Motion||Mouse is moved|
|xbeM_LbClick||Click of left mouse button|
|xbeM_RbClick||Click of right mouse button|
|xbeM_LbDblClick||Double click of left mouse button|
|xbeM_RbDblClick||Double click of right mouse button|
Coordinates: The coordinates of the mouse pointer are found in the first parameter after the call to the function AppEvent(). It is an array with two elements containing numeric values for the position of the mouse pointer. By default the coordinates for VIO (text) mode are returned. The current window (XbpCrt object) has two settings for the mouse coordinates: text mode and graphic mode. Switching between the two modes is done as follows:
Constants for the mode in which mouse coordinates are reported are defined in the include file Xbp.ch.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.