1,184
社区成员
发帖
与我相关
我的任务
分享
procedure TForm1.Button1Click(Sender: TObject);
begin
SendMessage(ScrollBox1.Handle, WM_VSCROLL, SB_PAGEDOWN, 0);
if scrollbox1.VertScrollBar.Range - scrollbox1.VertScrollBar.Position + 20 = scrollbox1.Height then
button1.Enabled:= false
else
button2.Enabled:= true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
SendMessage(ScrollBox1.Handle, WM_VSCROLL, SB_PAGEUP, 0);
if scrollbox1.VertScrollBar.Position = 0 then
button2.Enabled:= false
else
begin
button1.Enabled:= true;
end;
end;