Warum verschwendet Button1 nach dem Klick !!!
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var MyIniFile : TInifile;
begin
if FileExists('MyIniFile3.ini') then
begin
MyIniFile := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'MyIniFile3.ini');
Edit1.Text := MyIniFile.ReadString('Section1','text1','nicht gefunden')
end
else
begin
//close;
ShowMessage('nicht gefunden ');
MyIniFile.Free;
end;