That's what addhandler and withevents created for .

Here's an example , that uses the power of addhandler method : Addhandler can fires one or multiple events or methods at the same time . This is also called delegates. This creates new timer control and you can manage its events at runtime.


VB Code:
  1. Dim WithEvents TimerEvent As Timer
  2.     Dim timr As New Timer()
  3.    
  4.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  5.         timr.Interval = 2000
  6.         timr.Enabled = True
  7.     End Sub
  8.  
  9.     Private Sub FireTimer(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerEvent.Tick
  10.         MsgBox("Hey there")
  11.     End Sub
  12.  
  13.     Private Sub StopTimer()
  14.         timr.Enabled = False
  15.     End Sub
  16.  
  17.     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  18.         AddHandler timr.Tick, AddressOf FireTimer
  19.     End Sub
  20.  
  21.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  22.         timr.Enabled = False
  23.     End Sub