你把代码改为,再把两次出现的文本内容告诉我:
procedure TForm1.Button1Click(Sender: TObject);
var
i:Integer;
SL1:TStringList;
str : string;
begin
SL1:=TStringList.Create;
SL1.LoadFromFile('../aaa.txt');
for i:=0 to SL1.Count-1 do
begin
str := Extractfileext(SL1.Strings);
if str='.bmp' then
begin
ShowMessage(format('%s %d %s',[str,i,SL1.Strings]);
Image.Picture.LoadFromFile('../inf/12.bmp');
Image.Enabled:=True;
Image.Effect := TEffect(ieCircle);
Image.Invalidate;
end;
end;
end;