procedure TForm1.FormCreate(Sender: TObject);
var
I: Integer;
begin
with TIniFile.Create(cFileNameIni) do try
for I := 0 to ComponentCount - 1 do
if Components is TEdit then
TEdit(Components).Text := ReadString('Edit', Components.Name, '');
finally
Free;
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
var
I: Integer;
begin
with TIniFile.Create(cFileNameIni) do try
for I := 0 to ComponentCount - 1 do
if Components is TEdit then
WriteString('Edit', Components.Name, TEdit(Components).Text);
finally
Free;
end;
end;