...check if a mouse is present?

Author: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch

Category: Misc

function MouseExists: Boolean;
begin
 
Result := GetSystemMetrics(SM_MOUSEPRESENT) <> 0;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  if 
MouseExists then
    
ShowMessage('Mouse present.');
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base