Advertisement
5_2007-2008 Miscellaneous #173235

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

Shrnutí 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.

Zdrojový kód
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
Původní komentáře (3)
Obnoveno z Wayback Machine