1。以下这一处理过程用来在MEMO1中寻找字符串FindText(由FindDialog1组件所获得)。如FindText存在,焦点即停在找到的(该字符串的)第一个出现上。
2。可以看出,此过程不但可以聚焦到行,还能聚焦到某行中间的某个字符串上。关键是 Memo1.SetFocus,Memo1.SelStart ,Memo1.SelLength 三个参数;
3。你要人为地聚焦到某一行,你应统计该行的首字是MEMO中的第几个字,将它赋给Memo1.SelStart,而Memo1.SelLength 则为行长。 
      The following OnFind event handler searches a memo component for the text specified in the FindText property of a find dialog component. If found, the first occurrence of the text in Memo1 is selected. The code uses the Pos function to compare strings, and stores the number of characters to skip when determining the selection position in the SkipChars variable. Because there is no handling of case, whole word, or search direction in this algorithm, it is assumed that the Options property of FindDialog1 was set to [frHideMatchCase, frHideWholeWord, frHideUpDown].procedure TForm1.FindDialog1Find(Sender: TObject);var
  I, J, PosReturn, SkipChars: Integer;
begin
  for I := 0 to Memo1.Lines.Count do
  begin
    PosReturn := Pos(FindDialog1.FindText,Memo1.Lines[I]);
    if PosReturn <> 0 then {found!}
    begin
      Skipchars := 0;
      for J := 0 to I - 1 do
        Skipchars := Skipchars + Length(Memo1.Lines[J]);
      SkipChars := SkipChars + (I*2);
      SkipChars := SkipChars + PosReturn - 1;      Memo1.SetFocus;
      Memo1.SelStart := SkipChars;
      Memo1.SelLength := Length(FindDialog1.FindText);
      Break;
    end;
  end;end;