当前位置: 首页 > 工具软件 > Scroll Box > 使用案例 >

Delphi ScrollBox 响应鼠标滑轮事件

马弘和
2023-12-01
procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
  WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
begin
  if WheelDelta < 0 then
    ScrollBox1.Perform(WM_VSCROLL,SB_LINEDOWN,0)
  else
    ScrollBox1.Perform(WM_VSCROLL,SB_LINEUP,0);
end;
 类似资料: