_CustomControlTimerEvents interface
The event source interface of CustomControlTimer, declaring the single OnTimer callback that fires on each tick.
This interface is the [Default, Source] interface of the CustomControlTimer CoClass. A field declared with WithEvents receives the OnTimer event through this interface automatically; there is no need to reference _CustomControlTimerEvents by name in application code.
Private WithEvents InternalTimer As CustomControlTimer
Private Sub OnInitialize(ByVal Ctx As CustomControls.CustomControlContext) _
Implements CustomControls.ICustomControl.Initialize
Set Me.InternalTimer = CType(Of CustomControlTimer)(Ctx.CreateTimer())
Me.InternalTimer.Interval = 100
Me.InternalTimer.Enabled = True
End Sub
Private Sub OnTimer() Handles InternalTimer.OnTimer
' called every 100 ms while the timer is enabled
End Sub
Events
OnTimer
Raised every Interval milliseconds while the timer’s Enabled property is True.
Syntax: object_OnTimer( )
See Also
- CustomControlTimer – the timer class whose ticks fire OnTimer; exposes Interval and Enabled
- CustomControlContext – supplies CreateTimer, the factory method that returns a CustomControlTimer