再度关注'file not found',新发现,都是timer惹的祸! (50分)

X

xp166

Unregistered / Unconfirmed
GUEST, unregistred user!
程序里调用了好几个ini都没问题,唯独Timer出了错,运行时出现注'file not found'
的message。
不只是不是写法有错
//得到当前目录
NewFileName := ExtractFilePath(Application.ExeName);
//打开times.ini文件,读取里面的内容,把内容内容付给变量S
AssignFile(F1, NewFileName+'times.ini');
Reset(F1);
Readln(F1, S1);
CloseFile(F1);

Timer1.Interval:=StrToInt(S1);
Timer1.Enabled:=true;
 
可能间隔时间太短的缘故,
你应该
application.processmessage
 
我设的是5分钟
 
正常来说是没有问题的,可能是放的位置不对,你检查一下,和别的有什么区别
 
真的如你所说
 
顶部