Mega Code Archive

 
Categories / Delphi / Hardware
 

Detect a wheel of mouse

Title: Detect a wheel of mouse Use GetSystemMetrics function with SM_MOUSEWHEELPRESENT parameter. Note: for Windows NT only. procedure TForm1.Button1Click(Sender: TObject); begin if GetSystemMetrics(SM_MOUSEWHEELPRESENT)&lt&gt0 then Label1.Caption:='You have a wheel' else Label1.Caption:='You have not a wheel'; end;