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



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

DetectMouse

Detect the presence of a mouse.

Declaration

Source position: mouseh.inc line 68

function DetectMouse: Byte;

Description

DetectMouse detects whether a mouse is attached to the system or not. If there is no mouse, then zero is returned. If a mouse is attached, then the number of mouse buttons is returnead.

This function should be called after the mouse driver was initialized.

Errors

None.

See also

InitMouse

  

Initialize the FPC mouse driver.

DoneMouse

  

Deinitialize mouse driver.

Example

Program Example1;

{ Program to demonstrate the DetectMouse function. }

Uses mouse;

Var
  Buttons : Byte;

begin
  InitMouse;
  Buttons:=DetectMouse;
  If Buttons=0 then
    Writeln('No mouse present.')
  else
    Writeln('Found mouse with ',Buttons,' buttons.');
  DoneMouse;
end.

Notes

 No notes exist for this page yet. 





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