在FormMouseWheel添加事件就可以了:
1 2 3 4 |
|
procedure TForm1.FormMouseWheel(Sender: TObject; Shift:TShiftState;WheelDelta: Integer; MousePos: TPoint; var Handled:Boolean);
begin
VertScrollBar.Position:= VertScrollBar.Position -WheelDelta ;//如果你想要速度慢点的话用VertScrollBar.Position -(WheelDelta div 10)
end;