Registriert seit: 16. Mär 2009
108 Beiträge
Delphi 2007 Architect
|
Re: Frage zu IniFile
27. Jan 2010, 14:53
Delphi-Quellcode:
var Ini: TIniFile;
i: Integer;
begin
ini := TIniFile.Create('C:\Versuch.ini');
try
// Zum Speichern
For i := 0 to ComponentCount - 1 do
begin
If Components[i] Is TEdit then
TEdit(FindComponent('Hallo' + IntToStr(i))).Text);
ini.WriteString('Daten'+FormatDateTime('yyyy',Summen.Date),(Components[i] as TEdit).name,(Components[i] as TEdit).text)
else if Components[i] is TDateTimePicker then
ini.WriteString('Summen',(Components[i] as TDateTimePicker).name,FormatDateTime('yyyymm',(Components[i] as TDateTimePicker).Date));
end;
finally
ini.Free;
end;
end;
Was mache ich falsch ?
|
|
Zitat
|