[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LimitMouse()
Limit the bounds of the mouse in graphic mode
Syntax
LimitMouse(<nTopLeftX>, <nTopLeftY>, <nBottomRightX>, <nBottomRightY>)
Arguments
<nTopLeftX>
Upper left X coordinate of the mouse cursor bounding box.
<nTopLeftY>
Upper left Y coordinate of the mouse cursor bounding box.
<nBottomRightX>
Lower right X coordinate of the mouse cursor bounding box.
<nBottomRightY>
Lower right Y coordinate of the mouse cursor bounding box.
Returns
0
Success.
-99
Parameter is invalid.
Remarks
LimitMouse() limits or restrict movement of the graphic mouse cursor to
the bounding box specified by (<nTopLeftX>, <nTopLeftY>) to
(<nBottomRightX>, <nBottomRightY>). Useful to restrict movement of mouse
cursor to a particular menu area until an action occurs.
Example
This allows mouse cursor to be moved within a bounding box whose coords
are the upper left quadrant of 640x480 video mode
nStatus = FindVideoMode(640, 480, 16)
nStatus = OpenLiveMouse(0, 0)
nStatus = LimitMouse(0, 0, 319, 239)
nStatus = Sleep(6)
nStatus = CloseLiveMouse()
nStatus = TextMode()
For other examples of how to use the mouse support functions, see
SUNMOUSE.PRG, an example program distributed with Sunshow Pro.
See Also: CheckMouse() CloseLiveMouse() GetMousePosition() HideMouse() OpenLiveMouse() PositionMouse() SetMouseCursor() ShowMouse()
Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson