Search Tools Links Login

Anouther Formless Timer


This example shows a !completely! formless Timer alternative that only uses 2 API calls (SetTimer & KillTimer). This example also addresses some secuirity issues presented by the SetTimers CallBacks. I also defined all the exposed property descriptions for easy inclusion into your projects.

Original Author: Dane Jones

Inputs

Interval Property as a Long value representing Milliseconds.
Enabled Property used to Start or stop the Timer (Not to faroff from the VB Timer Control)

Assumptions

The API is finiky, I crashed the VB IDE 3 times developing this tidbit until I got it stable. If you want to modify the code save often or the API will bite you.

Returns

Returns a 'Timer' Event

Side Effects

Some security issues that you will see in the code/comments

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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 124 times

Categories

Visual Basic 6

Attachments

Anouther_F657673272002.zip
Posted: 9/3/2020 3:45:00 PM
Size: 14,506 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.