This is an OCX example of the SetTimer and KillTimer API calls. You can essentially replace the VB timer with this example. The Interval property can be set to as long as 24 days. It also has a ProcessPriority property to easily change the priority of your application.
Original Author: Paul Mather
Returns
Has the same properties and events as the standard VB Timer.
Side Effects
Please note that the API does not seem to have the necessary resolution to keep accurate time. If you count 60 ticks of 1000 msec interval, you’ll find that it actually took longer than that 60000 msec. This can get worse with high processor load. This (as with the standard VB timer) should be used as a re-occurring event trigger rather than a time accurate counter.
Please note that wrapping the SetTimer and KillTimer API calls in an OCX is not necessarily desirable. For demonstrative purposes, this is the easiest way. However, in actual implementation, it would be bast to just have the IDBAS_Timer module.
Attachments
File | Uploaded | Size |
---|---|---|
CODE_UPLOAD947.zip | 9/3/2020 3:45:00 PM | 12749 |