在鼠标的MouseWheel事件里写入以下内容
if WheelDelta < 0 then
SendMessage(scrollBox1.Handle, WM_VSCROLL, SB_LINEDOWN, 0) //向下滚
else
SendMessage(scrollBox1.Handle, WM_VSCROLL, SB_LINEUP, 0); //向上滚
即可响应鼠标滚轮
2023-12-28 10:44:40
在鼠标的MouseWheel事件里写入以下内容
if WheelDelta < 0 then
SendMessage(scrollBox1.Handle, WM_VSCROLL, SB_LINEDOWN, 0) //向下滚
else
SendMessage(scrollBox1.Handle, WM_VSCROLL, SB_LINEUP, 0); //向上滚
即可响应鼠标滚轮