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



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

GetMouseButtons

Get the state of the mouse buttons

Declaration

Source position: mouseh.inc line 84

function GetMouseButtons: Word;

Description

GetMouseButtons returns the current button state of the mouse, i.e. it returns a or-ed combination of the following constants:

MouseLeftButton
When the left mouse button is held down.
MouseRightButton
When the right mouse button is held down.
MouseMiddleButton
When the middle mouse button is held down.

Errors

None.

See also

GetMouseEvent

  

Get next mouse event from the queue.

GetMouseX

  

Query the current horizontal position of the mouse cursor.

GetMouseY

  

Query the current vertical position of the mouse cursor.

Example

Program Example2;

{ Program to demonstrate the GetMouseButtons function. }

Uses mouse;

begin
  InitMouse;
  Writeln('Press right mouse button to exit program');
  While (GetMouseButtons<>MouseRightButton) do ;
  DoneMouse;
end.

Notes

 No notes exist for this page yet. 





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