VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Code-Based Timers

Kamilche  (35 Submissions)   Miscellaneous   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

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

Assumes
The routine that will be called every Timer milliseconds, MUST be placed in a standard module! It can't be placed on a form, or in a class.

API Declarations
Private Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Private Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long

Rate Code-Based Timers (4(4 Vote))
Code-Based Timers.bas

Code-Based Timers Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters