ex7.pp 400 B

12345678910111213141516171819
  1. Program Example7;
  2. { Program to demonstrate the SetMouseXY function. }
  3. Uses mouse;
  4. begin
  5. InitMouse;
  6. Writeln('Click right mouse button to quit.');
  7. SetMouseXY(40,12);
  8. Repeat
  9. Writeln(GetMouseX,',',GetMouseY);
  10. If (GetMouseX>70) then
  11. SetMouseXY(10,GetMouseY);
  12. If (GetMouseY>20) then
  13. SetMouseXY(GetMouseX,5);
  14. Until (GetMouseButtons=MouseRightButton);
  15. DoneMouse;
  16. end.