Dobrý den, nejsem si jist jestli je to presně to co chcete.
Dim hodnota As Integer = 6
Private Sub odpocitavej_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles odpocitavej.Click
Timer1.Enabled = True
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = False
TextBox1.Text = hodnota
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
hodnota = hodnota - 1
TextBox1.Text = hodnota
If TextBox1.Text = 0 Then
MsgBox("Odpocet kompletni")
Timer1.Enabled = False
Else
End If
End Sub
|