Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Sunshow Pro V3.0 - <b>limitmouse()</b> http://www.X-Hacker.org [<<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.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson