i use this code:-
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
If button.Location.Y >= 618 Then
MessageBox.Show("You lost!", "Failure", MessageBoxButtons.RetryCancel)
Timer1.Enabled = False
End If
End Sub
Let us assume the condition is always true then instead of disabling timer1, it display messagebox infinite times.But if i write Timer.enable = false first and then messagebox then the timer stops. Why does this happen