home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MOUSETP4.ZIP / TEST.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1988-03-20  |  667 b   |  26 lines

  1. uses Mouse, Crt, Graph;
  2.  
  3. var
  4. Gd, Gm: integer;
  5. MouseStat: MousePos;
  6.  
  7. begin
  8. Gd := CGA;
  9. Gm := CGAC0;
  10. initgraph (Gd, Gm, '');
  11. if GraphResult <> 0 then halt (254);
  12. line (0, 0, 640, 200);
  13. SetInvisWindow (100, 80, 300, 140);
  14. ShowMouse;
  15. MouseStat.ButtonStat := 0;
  16. while MouseStat.ButtonStat <> 7 do
  17.   begin
  18.   GetMousePos (MouseStat);
  19.   gotoxy (10, 10);
  20.   writeln (MouseStat.X, MouseStat.Y);
  21.   if MouseStat.ButtonStat = 1 then DefinePointer (0, 0, ArrowCursor);
  22.   if MouseStat.ButtonStat = 2 then DefinePointer (8, 8, MagnifyingGlass);
  23.   if MouseStat.ButtonStat = 3 then SetMouseWindow (10, 10, 200, 150);
  24.   if keypressed then halt (255);
  25.   end;
  26. end.