Hi all:
I have a label (lStart) that I want to keep track of the time left for a Test that our employees have to take.
I'm not even getting it to display anything, but basically I have a starttime (sTime) and an end time (eTime). I want the label to show how much time is left.
This is what I have so far:
Any help will be greatly apreciated.
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.
My newest novel: Wooden Warriors
I have a label (lStart) that I want to keep track of the time left for a Test that our employees have to take.
I'm not even getting it to display anything, but basically I have a starttime (sTime) and an end time (eTime). I want the label to show how much time is left.
This is what I have so far:
Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim Ticks As Integer
Ticks += 1
If DateAndTime.TimeOfDay = Now Then
MsgBox("Time is up!", MsgBoxStyle.Critical + MsgBoxStyle.OKOnly, Title)
End If
Dim TimeLeft As DateTime
TimeLeft = DateAdd(DateInterval.Second, 1800 - Ticks, Now)
lStart.Text = Format(TimeLeft, "MM:SS")
End Sub
Any help will be greatly apreciated.
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.
My newest novel: Wooden Warriors