Hallo zusammen,
es funktioniert jetzt mit dem relativen Pfad
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var MyIniFile : TInifile;
begin
MyIniFile := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'MyIniFile3.ini');
MyIniFile.WriteString('Section1','edit1.text', '22222222222222');
MyIniFile.WriteString('Section1','edit2.text', '33333333333333');
MyIniFile.Free;
end;
procedure TForm1.Button2Click(Sender: TObject);
var MyIniFile : TInifile;
begin
MyIniFile := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'MyIniFile3.ini');
Edit1.Text := MyIniFile.ReadString('Section1','edit1.text','nicht gefunden');
Edit2.Text := MyIniFile.ReadString('Section1','edit2.text','nicht gefunden');
MyIniFile.Free;
end;
Delphi-Quellcode:
_____ ___ __ _ _ _ _____
| _ \ / | | \ | | | | / / | ____|
| | | | / /| | | \| | | |/ / | |__
| | | | / / | | | |\ | | |\ \ | __|
| |_| | / / | | | | \ | | | \ \ | |___
|_____/ /_/ |_| |_| \_| |_| \_\ |_____|