[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Get_Mouse_Action                                                KeyTTT



Purpose   Determine mouse activity i.e. movement and button presses.

Declaration    Get_Mouse_Action(var But:button; var Hor, Ver:
               integer);

          But is retuned with one of NoB, LeftB, RightB, BothB
          Hor and Ver return the horizontal and vertical movement

Uses CRT, DOS, KeyTTT.

Remarks   This procedure is designed for internal use and is called by
          GetKey.

          The Hor & Ver variables return the movement in cols and rows
          not pixels i.e. Pixel div 8. The movement is returned
          relative to the position of the mouse the last time the
          procedure was called.

Example


               USES CRT, DOS, KEYTTT;
               VAR
               B : BUTTON;
               X,Y : INTEGER;
               BEGIN
                 REPEAT
                   GET_MOUSE_ACTION(B,X,Y);
                 UNTIL B = LEFTB;
               END.



This program continues looping until the left mouse button is pressed.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson