Advertisement
2_2002-2004 Miscellaneous #118347

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

Resumen de IA: 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.

Código fuente
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
Comentarios originales (3)
Recuperado de Wayback Machine