I am trying to create timers on demand by doing the following:
Dim NewTimer As New System.Timers.T imer
NewTimer.Interv al = 10000
AddHandler NewTimer.Elapse d, AddressOf Timeup
NewTimer.Enable d = True
NewTimer.Start( )
My problem then happens in the TimeUp routine
Normally, to get the name of the control that has been fired you would do:
Private Sub Timeup(ByVal sender As System.Object, ByVal e As
System.Timers.E lapsedEventArgs )
Dim mytimer = DirectCast(send er, Control).Name.T oString
End Sub
The problem is that timers do not have a property called 'Name'. How can I
reference which timer is being fired?
Thanks
-Jerry
Dim NewTimer As New System.Timers.T imer
NewTimer.Interv al = 10000
AddHandler NewTimer.Elapse d, AddressOf Timeup
NewTimer.Enable d = True
NewTimer.Start( )
My problem then happens in the TimeUp routine
Normally, to get the name of the control that has been fired you would do:
Private Sub Timeup(ByVal sender As System.Object, ByVal e As
System.Timers.E lapsedEventArgs )
Dim mytimer = DirectCast(send er, Control).Name.T oString
End Sub
The problem is that timers do not have a property called 'Name'. How can I
reference which timer is being fired?
Thanks
-Jerry
Comment