...determine the number of mouse buttons?
Author: Thomas Stutz
// if the result is 0, no mouse is present
// wenn result 0 zurückgibt, ist keine Maus angeschlossen.
function GetNumberOfMouseButtons: Integer;
begin
Result := GetSysTemMetrics(SM_CMOUSEBUTTONS);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage('Your mouse has ' + IntToStr(GetNumberOfMouseButtons) + ' buttons.');
end;
printed from
www.swissdelphicenter.ch
developers knowledge base