J Jacky Zhao Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #1 假设一个Timer的interval为1000,但它的OnTimer事件需要2秒,怎样让它执行完这个事件后再执行下一个循环. OnTimer只有达到条件时需要2秒,其它时间只是判断是否达到这个条件.
A Another_eYes Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #2 什么意思呀? var flag; procedure Txxxx.Timer1Timer(Sender: TObject); begin if flag then run_something; flag := not flag; end; 还是: procedure Txxxx.Timer1Timer(Sender: TObject); begin // 延时2秒 end; ??
什么意思呀? var flag; procedure Txxxx.Timer1Timer(Sender: TObject); begin if flag then run_something; flag := not flag; end; 还是: procedure Txxxx.Timer1Timer(Sender: TObject); begin // 延时2秒 end; ??
A amo Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #3 好难理解 var one:boolean=false; if one then exit; one:=true; if condition=true then //do sth that need 2sec one:=false;
好难理解 var one:boolean=false; if one then exit; one:=true; if condition=true then //do sth that need 2sec one:=false;
N nuke Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-11 #4 ??? 执行代码的时候把他的enable:=false; 执行完再enable:=true; ???? 我理解对了吗??? 呵呵,好难懂你的意思哦!