频道分类

Delphi MEMO 循环往上往下滚动

作者:admin 来源: 日期:2020/3/28 22:56:22 人气: 标签:

 
// 循环往上滚动
  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;

上一篇:Delphi 非主窗体(即子窗体)在任务栏显示按钮下一篇:没有资料