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>positionmouse()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PositionMouse()

Position the mouse cursor in graphic mode to X,Y coordinates


Syntax

PositionMouse(<nXCoord>, <nYCoord>)


Arguments

<nXCoord>
The X coordinate to position the graphic mouse cursor (in pixels).

<nYCoord>
The Y coordinate to position the graphic mouse cursor (in pixels).


Returns

0
Success.

-99
Parameter is invalid.


Remarks

PositionMouse() positions the graphic mode mouse cursor to (X, Y) screen 
coordinates. This allows the mouse cursor to be relocated to different 
areas of the screen. The mouse cursor is automatically hidden prior to 
repositioning it and automatically redisplayed at new coordinates.


Example

nStatus = FindVideoMode(640, 480, 16)
nStatus = OpenLiveMouse(0, 0)
nStatus = Sleep(5)
nStatus = PositionMouse(320, 240)
nStatus = Sleep(6)
nStatus = PositionMouse(639, 479)
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() LimitMouse() OpenLiveMouse() SetMouseCursor() ShowMouse()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson