Delphi Base

WindSon

导航

Delphi MEMO 循环往上往下滚动

// 循环往上滚动
  if Memo1.Perform(EM_SCROLL,SB_LINEDOWN,0)=0 then
  begin
  Memo1.Perform(WM_VSCROLL,SB_TOP,0);
  end
  else
  begin
  SendMessage(Memo1.Handle,WM_VSCROLL,SB_LINEDOWN,0);
  end;

// 执行到底 SendMessage(Memo1.Handle, EM_SCROLL, SB_BOTTOM, 0);
//一步一步往下走 SendMessage(Memo1.Handle,WM_VSCROLL,SB_LINEDOWN,0);
// 往下走 SendMessage(Memo1.Handle,EM_SCROLL,SB_PAGEDOWN,0);
if Memo1.Perform(EM_SCROLL, SB_LINEDOWN, 0)=0 then//下滚
button2.Enable := False;
if Memo1.Perform(EM_SCROLL, SB_LINEUP, 0)=0 then//上滚
button1.Enable := False;

 

posted on 2020-03-25 20:38  windsonvip  阅读(778)  评论(0编辑  收藏  举报