Advertisement
ASP_Volume2 Miscellaneous #31594

Code-Based Timers

Start and kill a timer using API calls only! Useful when you need timers that can't be placed on a form.

AI

AI 摘要: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

源代码
original-source
'Make this a global variable, or site it
'in the same module as MainLoop.
Public Timer as Long
'To set the timer, issue the 
'following, where MainLoop 
'is the name of the procedure 
'to call every 500 milliseconds.
'Note that MainLoop MUST exist 
'in a BAS module!
Timer = SetTimer(0, 0, 500, AddressOf MainLoop)
'To kill the timer, 
'issue the following:
KillTimer 0, Timer
原始评论 (3)
从 Wayback Machine 恢复