due to some VS problems I have started declaring timers at runtime such as
Private WithEvents _TmrAll As New Timer
Now when I shutdown my app, I want to disable all timers. I used to make it like so:
Private Sub pDisableAllTimers()
For Each T As Control In Me.Controls
Dim sName As String = T.GetType.Name
If sName = "Timer" Then
T.Enabled = False
End If
Next T
End Sub
But for the timers declared at runtime, this doesn't seem to work. At least they're not found in the loop.
Thank you.