home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / visionix / test / tpoint.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-12-28  |  834 b   |  67 lines

  1. program tpoint;
  2.  
  3. uses
  4.  
  5.   vpointu,
  6.   vgenu,
  7.   vcrtu;
  8.  
  9.  
  10. var
  11.  
  12.  
  13.   b : byte;
  14.   x : word;
  15.   y : word;
  16.  
  17.   done : boolean;
  18.  
  19. begin
  20.  
  21.   If VMouseOpen( 0, 1 )=0 Then
  22.   BEGIN
  23.  
  24.     ClrScr;
  25.  
  26.     VMouseOn;
  27.  
  28.     done := false;
  29.  
  30.     WriteLn('TPoint; VisioTools VPOINTu tester; Version 0.9');
  31.     Writeln;
  32.     WriteLn('Press <ESC> to exit');
  33.  
  34.     While Not Done DO
  35.     BEGIN
  36.  
  37.       VMouseRead( B, X, Y );
  38.  
  39.       GotoXY(1,5);
  40.  
  41.       WriteLn(' Buttons=',B:5,
  42.               '   X=',X:5,
  43.               '   Y=',Y:5   );
  44.  
  45.       If Keypressed then
  46.       BEGIN
  47.  
  48.         Case ReadKey of
  49.  
  50.           '1' : VMouseOn;
  51.           '2' : VMouseOff;
  52.           #27 : Done:=TRUE;
  53.  
  54.         END;
  55.  
  56.       END;
  57.  
  58.     END;
  59.  
  60.     VMouseClose;
  61.  
  62.   END
  63.   ELSE
  64.     WriteLn('No Mouse device driver can be found.');
  65.  
  66. END.
  67.