//滚轮事件:ScrollBox1: TScrollBox;
procedure TfrmReleateGQAccount.ScrollBox1MouseWheel(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;
![]()
object scrlbx1: TScrollBox
Left = 1
Top = 1
Width = 479
Height = 379
Align = alClient
Color = clBtnFace
ParentColor = False
TabOrder = 0
ExplicitLeft = 6
ExplicitTop = 2
end
控件窗体文件