you could use timespans, then you'd only need 1 timer
vb.net Code:
Public Class Form1 Dim t1 As New TimeSpan(0, 0, 0) Dim t2 As New TimeSpan(8, 0, 0) Dim t3 As New TimeSpan(16, 0, 0) Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim timeNow As New TimeSpan(Now.Hour, Now.Minute, Now.Second) If timeNow > t1 And timeNow < t2 Then 'do something ElseIf timeNow > t2 And timeNow < t3 Then 'do something ElseIf timeNow > t3 And timeNow < New TimeSpan(24, 0, 0) Then 'do something End If End Sub end class




Reply With Quote