求教老师:计时器如何用表单编写
帮忙用表单编写一个数字时钟计时器有五个按钮
复位 文本框中全是000000
计时 文本框开始计时
停止 显示文本框停止时的时间
时钟 显示系统时间
关闭 关闭表单
谢谢! 好难做了好久都没出来!忘高手帮帮忙!
proc tmr1.init thisform.caption =" 计时器" thisform.lb1.caption ="00:00:00:000" set seco on publ tmrun,tmsec proc tmr1.timer thisform.cmdx.caption =ttoc(datetime(),2) if tmrun=.t. ls =seco()-tmsec ls整秒 =int(ls) thisform.lb1.caption =padl(int(ls整秒/3600),2,"0")+":" +padl(int((ls整秒%3600)/60),2,"0")+":"; +padl(ls整秒%60,2,"0")+":" +righ(str(ls,12,3),3) endif proc cmd.click para ls do case case "开始"$this.caption thisform.tmr1.reset tmrun =.t. tmsec =seco() case "停止"$this.caption tmrun =.f. case "复位"$this.caption thisform.lb1.caption ="00:00:00:000" tmrun =.f. case "退出"$this.caption thisform.release endcase enddefine