Hi if anyone could help with the following, i would appreciate it:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActivate.Click
If btnActivate.Text = "Stop" Then
btnActivate.Text = "Start"
Timer1.Enabled = False
Else
btnActivate.Text = "Stop"
Timer1.Enabled = True
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static Dim iPhase As Integer = 0
iPhase = iPhase + 1
If iPhase = 24 Then
iPhase = 1
End If
txtNow.Text = Now.ToLongTimeString & " " & iPhase
End Sub
The above is a coding which makes a timer start running on and off. The text also changes in the command button. If some1 could help me with the following code i would be greatful. I need help as i have another text box and every second that has passed on the timer i want to be shown in the text box. For example if i turn it on and off and it is for 5 second i want 5 displayed in the text box.
Thanks in advance
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActivate.Click
If btnActivate.Text = "Stop" Then
btnActivate.Text = "Start"
Timer1.Enabled = False
Else
btnActivate.Text = "Stop"
Timer1.Enabled = True
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static Dim iPhase As Integer = 0
iPhase = iPhase + 1
If iPhase = 24 Then
iPhase = 1
End If
txtNow.Text = Now.ToLongTimeString & " " & iPhase
End Sub
The above is a coding which makes a timer start running on and off. The text also changes in the command button. If some1 could help me with the following code i would be greatful. I need help as i have another text box and every second that has passed on the timer i want to be shown in the text box. For example if i turn it on and off and it is for 5 second i want 5 displayed in the text box.
Thanks in advance