The following example demonstrates the use of the Perform method to send a windows message. The message scrolls the caret in the rich edit into view. The caret position is set to the contents of the mask edit prior to calling Perform.procedure TForm1.Button1Click(Sender: TObject);begin
with RichEdit1 do
Begin
SelStart := StrToInt(MaskEdit1.Text);
RichEdit1.Perform(EM_SCROLLCARET, 0, 0);
end;
end;
with RichEdit1 do
Begin
SelStart := StrToInt(MaskEdit1.Text);
RichEdit1.Perform(EM_SCROLLCARET, 0, 0);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货