呵呵,富婆就是有钱:)你搜一下以前的问题,有大把的答案。
我还是贴出来吧,免得你找着累:)
procedure TFrom1.SetLine(LineNum: Integer);
var
ScrollLn: Integer;
begin
RichEdit1.SelStart := RichEdit1.Perform(EM_LINEINDEX, LineNum, 0);
ScrollLn := LineNum - RichEdit1.Perform(EM_GETFIRSTVISIBLELINE, 0, 0);
RichEdit1.Perform(EM_LINESCROLL, 0, ScrollLn);
end;