home *** CD-ROM | disk | FTP | other *** search
- uses Mouse, Crt, Graph;
-
- var
- Gd, Gm: integer;
- MouseStat: MousePos;
-
- begin
- Gd := CGA;
- Gm := CGAC0;
- initgraph (Gd, Gm, '');
- if GraphResult <> 0 then halt (254);
- line (0, 0, 640, 200);
- SetInvisWindow (100, 80, 300, 140);
- ShowMouse;
- MouseStat.ButtonStat := 0;
- while MouseStat.ButtonStat <> 7 do
- begin
- GetMousePos (MouseStat);
- gotoxy (10, 10);
- writeln (MouseStat.X, MouseStat.Y);
- if MouseStat.ButtonStat = 1 then DefinePointer (0, 0, ArrowCursor);
- if MouseStat.ButtonStat = 2 then DefinePointer (8, 8, MagnifyingGlass);
- if MouseStat.ButtonStat = 3 then SetMouseWindow (10, 10, 200, 150);
- if keypressed then halt (255);
- end;
- end.