Application.Exit works in the same application, in the same form, out of a button_click event, out of a Loop, this way:
Private Sub btnStop_Click(sender As Object, e As EventArgs) Handles btnStop.Click
Application.Exit()
End Sub
Private Sub Timer1_Tick(ByVal Sender As Object, ByVal e...