如何使timer事件的循环的时间为三分钟?
请高手支招.急求!如何使timer事件的循环的时间为三分钟?
[解决办法]
[code=VB]Dim dtNextTime as DatePrivate Sub Form_load() Timer1.interval=500 Timer1.Enabled=True dtNextTime=DateAdd("n",15,Now)'15分钟执行一次任务End SubPrivate Sub Timer1_Timer() if Now>=dtNextTime Then Timer1.Enabled=False '在此加入你的代码 dtNextTime=DateAdd("n",15,Now) Timer1.Enabled=True End ifEnd Sub