...determine the number of mouse buttons?
|
Autor:
Thomas Stutz |
[ Print tip
] | | |
// 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;
|