mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-28 23:01:49 +01:00
20 lines
399 B
ObjectPascal
20 lines
399 B
ObjectPascal
Program Example7;
|
|
|
|
{ Program to demonstrate the SetMouseXY function. }
|
|
|
|
Uses mouse;
|
|
|
|
begin
|
|
InitMouse;
|
|
Writeln('Click right mouse button to quit.');
|
|
SetMouseXY(40,12);
|
|
Repeat
|
|
Writeln(GetMouseX,',',GetMouseY);
|
|
If (GetMouseX>70) then
|
|
SetMouseXY(10,GetMouseY);
|
|
If (GetMouseY>20) then
|
|
SetMouseXY(GetMouseX,5);
|
|
Until (GetMouseButtons=MouseRightButton);
|
|
DoneMouse;
|
|
end.
|