Определить количество кнопок мышки

Материал из DRKB

Определить количество кнопок мышки[править | править код]

// if the result is 0, no mouse is present 

function GetNumberOfMouseButtons: Integer;
begin
  Result := GetSysTemMetrics(SM_CMOUSEBUTTONS);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessage('Your mouse has ' + IntToStr(GetNumberOfMouseButtons) + ' buttons.');
end;


Source: Взято с сайта: http://www.swissdelphicenter.ch
ID: 01564