mouse6.pp 498 B

12345678910111213141516171819202122
  1. {example for SetMouseXRange, SetMouseYRange and SetMouseWindow}
  2. Uses MsMouse, Crt;
  3. Begin
  4. If MouseFound Then
  5. Begin
  6. SetMouseXRange(20*8,50*8); {charracter width and height = 8 pixels}
  7. SetMouseYRange(10*8,15*8);
  8. {the two lines of code have exactly the same effect as
  9. SetMouseWindow(20*8,10*8,50*8,15*8)}
  10. Writeln('Press any key to quit.');
  11. ShowMouse;
  12. While KeyPressed Do ReadKey;
  13. Readkey;
  14. While KeyPressed Do ReadKey;
  15. HideMouse
  16. End
  17. End.