Показать сообщение отдельно
  #6  
Старый 22.12.2007, 11:38
Аватар для Oleg
Oleg Oleg вне форума
Активный
 
Регистрация: 29.11.2007
Адрес: Оренбургская обл., Россия
Сообщения: 261
Репутация: 15
Подмигивание Подробности

...
var
Form1: TForm1;
count:integer=0;

implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);
var
sFile: string;
Ini: TIniFile;
begin
if not FileExists(sFile) then
begin
Ini:=TIniFile.Create('D:\test.ini');
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);
Ini.WriteInteger('General', 'count', count+1);
Ini.Free;
end;
end;

Почему не работает таймер, когда кнопка, то всё работат.
Помогите разобраться...
Ответить с цитированием