
22.12.2007, 00:06
|
 |
Активный
|
|
Регистрация: 06.05.2007
Адрес: ГДЕ ТО В СОЛНЕЧНОЙ СИСТЕМЕ
Сообщения: 207
Репутация: 15
|
|
Может так:
Код:
procedure TForm1.Button1Click(Sender: TObject);
var
sFile: string;
Ini: TIniFile;
count:integer;
begin
if not FileExists(sFile) then
begin
Ini:=TIniFile.Create('D:\test.ini');
count:=0;
Ini.WriteInteger('General', 'count', 0);
Ini.Free;
end;
sFile := 'D:\test.ini';
if FileExists(sFile) then
begin
Ini := TIniFile.Create(sFile);
Ini.ReadInteger('General', 'count', count);
count:=count+1;
Ini.WriteInteger('General', 'count', count);
{èëè òàê
Ini.WriteInteger('General', 'count', count+1);
íèêàêîé ðàçíèöû}
Ini.Free;
end;
end;
__________________
Кому я должен - всем прощаю!!!!
|