help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions][Variables] Reference for unit 'Mouse' (#rtl)

GetMouseX

Query the current horizontal position of the mouse cursor.

Declaration

Source position: mouseh.inc line 78

function GetMouseX: Word;

Description

GetMouseX returns the current X position of the mouse. X is measured in characters, starting at 0 for the left side of the screen.

Errors

None.

See also

GetMouseButtons

  

Get the state of the mouse buttons

GetMouseEvent

  

Get next mouse event from the queue.

GetMouseY

  

Query the current vertical position of the mouse cursor.

Example

Program Example4;

{ Program to demonstrate the GetMouseX,GetMouseY functions. }

Uses mouse;

Var
  X,Y : Word;

begin
  InitMouse;
  Writeln('Move mouse cursor to square 10,10 to end');
  Repeat
    X:=GetMouseX;
    Y:=GetMouseY;
    Writeln('X,Y= (',X,',',Y,')');
  Until (X=9) and (Y=9);
  DoneMouse;
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505