M
Majed Abbas
Guest
I have a button and a timer, I want to:
when timer is stopped, exit button click event.
I have no idea how to do it
timer code is:
Private Sub Tmr_Tick(sender As Object, e As EventArgs) Handles Tmr.Tick
If timeLeft > 0 Then
timeLeft -= 1
TextBox2.Text = timeLeft & " seconds"
Else
Tmr.Stop()
TextBox2.Text = "Time's up!"
End If
End Sub
button code is:
Private Sub Btnrät_Click(sender As Object, e As EventArgs) Handles Btnrät.Click
If Lbltecen.Text = "+" Then
plus()
ElseIf Lbltecen.Text = "-" Then
minus()
ElseIf Lbltecen.Text = "x" Then
Gånger()
ElseIf Lbltecen.Text = "÷" Then
Delat()
ElseIf Lbltecen.Text = "plus" Then
Wath()
End If
End Sub
Continue reading...
when timer is stopped, exit button click event.
I have no idea how to do it
timer code is:
Private Sub Tmr_Tick(sender As Object, e As EventArgs) Handles Tmr.Tick
If timeLeft > 0 Then
timeLeft -= 1
TextBox2.Text = timeLeft & " seconds"
Else
Tmr.Stop()
TextBox2.Text = "Time's up!"
End If
End Sub
button code is:
Private Sub Btnrät_Click(sender As Object, e As EventArgs) Handles Btnrät.Click
If Lbltecen.Text = "+" Then
plus()
ElseIf Lbltecen.Text = "-" Then
minus()
ElseIf Lbltecen.Text = "x" Then
Gånger()
ElseIf Lbltecen.Text = "÷" Then
Delat()
ElseIf Lbltecen.Text = "plus" Then
Wath()
End If
End Sub
Continue reading...