Delphi-Quellcode:
function RegPath: String;
begin
Result := ExtractFileName(ChangeFileExt(ParamStr(0), '.ini'));
end;
procedure SaveFormSettings(frmKonfig : TfrmKonfig);
var
RegIni: TRegIniFile;
begin
RegIni := TRegIniFile.Create(RegPath);
try
RegIni.WriteInteger('Form', 'Color', frmKonfig.Color);
finally
RegIni.Free;
end;
end;
procedure LoadFormSettings(frmkonfig: TfrmKonfig);
var
RegIni: TRegIniFile;
begin
RegIni := TRegIniFile.Create(RegPath);
try
frmKonfig.Color := RegIni.ReadInteger('Form', 'Color', frmKonfig.Color);
finally
RegIni.Free;
end;
end;
was habe ich falsch gemacht?