if pos('18:00',TimeTOstr(time))<>0 then begin nighttongji; end;Timer的响应时间设置为300000,如果设得太小会影响你的系统效能
if pos('18:00',TimeTOstr(time))<>0 then begin nighttongji; end;Timer的响应时间设置为300000,如果设得太小会影响你的系统效能
没问题啊? 我也不知道是怎么搞的 我还用了别的办法,比如我程序里有个edit1是显示当前时间的 我在它的onchange事件里还加入了判断,也没有正常啊 if edit1.Text='18:00:00' then begin form1.Button9Click(sender); form1.Button14Click(sender); end;
我做过的用TIMER控件,去循环临听时间就可以了。
enchanter_love 能不能给出你的代码? 多谢
用 if formatdatetime('hh:mm:ss',time) = '18:00:00' then //18:00:00 ....
在Timer的OnTimer加上以下代码(Timer的Interval设为1000以下): if FormateDateTime('HH:MM:SS',Time)='18:00:00' then //YourFunction;
begin
nighttongji;
end;Timer的响应时间设置为300000,如果设得太小会影响你的系统效能
begin
nighttongji;
end;Timer的响应时间设置为300000,如果设得太小会影响你的系统效能
我也不知道是怎么搞的
我还用了别的办法,比如我程序里有个edit1是显示当前时间的
我在它的onchange事件里还加入了判断,也没有正常啊
if edit1.Text='18:00:00' then
begin
form1.Button9Click(sender);
form1.Button14Click(sender);
end;
能不能给出你的代码?
多谢
if formatdatetime('hh:mm:ss',time) = '18:00:00' then //18:00:00
....
if FormateDateTime('HH:MM:SS',Time)='18:00:00' then
//YourFunction;