Delphi初心者のための寺子屋
at TECH
62:デフォルトの名無しさん
05/12/07 01:04:33
>>61
begin
cnt:=0;
spos:=0;
str:=RichEdit1.Text;
PStr:=PChar(str);
len:=Length(sword);
repeat
p:=AnsiPos(sword, PStr+spos);
if (p>0) then
begin
Inc(cnt);
Inc(spos, p);
with RichEdit1 do
begin
SelStart:=spos-1;
SelLength:=len;
SelAttributes.Color:=clRed;
end;
Inc(spos, len);
end;
until p=0;
ShowMessage(IntToStr(cnt));
end;
//ここまで
よろしくお願いします。
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5231日前に更新/190 KB
担当:undef