Hello, i need help making a count down timer that can support at least 100 Hours, i got this code but it only supports 24 hours.
Dim TimePlayer1 As Date
Private Sub Button1_MouseClick(sender As Object, e As MouseEventArgs) Handles Button1.MouseClick
If e.Button = Windows.Forms.MouseButtons.Left Then
Select Case Me.Button1_Start.Text
Case "Start"
Me.TimePlayer1 = Date.Now.AddMinutes((Me.TextHours.Text.ToString * 60) + (Me.TextMins.Text.ToString))
Me.Timer1.Start()
Me.Button1.Text = "Stop"
Case "Stop"
Me.Timer1.Stop()
Me.Button1.Text = "Start"
End Select
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Me.TimePlayer1 < Date.Now Then
Me.Timer1.Stop()
MessageBox.Show("Time just finished.", "Time Out", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
Dim remainingTime As TimeSpan = Me.TimePlayer1.Subtract(Date.Now)
Me.LabelTime1Display.Text = "Time: " & String.Format("{0:d2}:{1:d2}:{2:d2}", remainingTime.Hours, remainingTime.Minutes, remainingTime.Seconds)
End If
End Sub
Any help ?