Registriert seit: 28. Jan 2006
Ort: Görlitz / Sachsen
489 Beiträge
Delphi 2007 Professional
|
Re: Kleines Problem mit INI
8. Okt 2007, 22:35
Delphi-Quellcode:
var
Form1: TForm1;
iniFile: TIniFile;
IniFileName : string = '.\test.ini';
implementation
{$R *.dfm}
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if iniFile = nil then iniFile := TIniFile.Create(IniFileName);
if iniFile <> nil then
begin
iniFile.WriteBool('Test','Eigenschaft',CheckBox1.Checked);
iniFile.UpdateFile;
iniFile.Free;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
if iniFile = nil then iniFile := TIniFile.Create(IniFileName);
if iniFile <> nil then
begin
CheckBox1.Checked :=iniFile.ReadBool('Test','Eigenschaft',CheckBox1.Checked);
end;
end;
mach doch so
Marcel
|
|
Zitat
|