下面的代码就可以了:
procedure Txianshi.Timer1Timer(Sender: TObject); //shang 向上滚动。
var a:integer;
begin
Memo1.Perform(WM_VSCROLL, SB_LINEDOWN, 0);
a:=SendMessage(Memo1.Handle,WM_VSCROLL,SB_LINEDOWN,0);
if a=0 then
begin
Memo1.Perform(WM_VSCROLL, SB_top , 0);
SendMessage(Memo1.Handle,WM_VSCROLL,SB_top ,0);
end;
end;