W wjiachun Unregistered / Unconfirmed GUEST, unregistred user! 2001-03-12 #2 var p:integer; p:=Pos('你要找的字符串',memo.Text); if(p>0)then begin memo.SelLength:=0; memo.SelStart:=p; PostMessage(Memo.Handle,EM_SCROLLCARET,0,0); end;
var p:integer; p:=Pos('你要找的字符串',memo.Text); if(p>0)then begin memo.SelLength:=0; memo.SelStart:=p; PostMessage(Memo.Handle,EM_SCROLLCARET,0,0); end;
林 林沐 Unregistered / Unconfirmed GUEST, unregistred user! 2001-03-12 #3 var p:integer; len:integer; findstr:string; begin findstr:='xxxx'; len:=length(findstr); p:=Pos(findstr,memo.Text); if(p>0)then begin memo.SetFocus; memo.SelStart:=p-1; memo.SelLength:=len; end; end;
var p:integer; len:integer; findstr:string; begin findstr:='xxxx'; len:=length(findstr); p:=Pos(findstr,memo.Text); if(p>0)then begin memo.SetFocus; memo.SelStart:=p-1; memo.SelLength:=len; end; end;