Constructors: NewTicker

NewTicker

Creates a new Ticker.



 Public Function NewTicker(
	  ByVal Interval As Long,
	  Optional ByRef Data As Variant,
	  Optional ByVal AutoReset As Boolean = True,
	  Optional ByVal AddressOfCallback As Long ) As Ticker

Parameters

Interval
[ByVal] Long. The delay between events in milliseconds.
Data
[ByRef] Optional. Variant. A user supplied value to be associated with the timer.
AutoReset
[ByVal] Optional. Boolean. True to have the timer event recur, False for one event.  

Default: True

AddressOfCallback
[ByVal] Optional. Long. An address to a callback method that can be called when the timer has elapsed. Setting this to zero will stop the callback.

Return Values

Ticker -  A new Ticker object.

Remarks

A callback method is used to allow a timer object to notify the function without having to use an Event. A function callback must have the following signature, or the application may crash.

 Public Sub TickerCallback(ByRef Ticker As Ticker, ByRef Data As Variant)
      do stuff
 End Sub
 
The two parameters must be declared as ByRef.

See Also

Project CorLib Overview

Class Constructors Overview