Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionDe toute façon cette méthode ne marche plus, d'un coup, je sais même pas pourquoi, j'ai absolument rien modifier et sa marche plus dutout.
Public Class Form1 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim decompte As String = TextBox1.Text TextBox1.Text -= 1 If TextBox1.Text = 0 Then Timer1.Stop() End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Start() TextBox1.Enabled = False End Sub End Class
Dim timeellapse As Integer Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Timer1.Interval = 1000 Timer1.Start() Integer.TryParse(compteur.Text, timeellapse) affichage.Text = String.Empty End Sub Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick affichage.Text = (timeellapse \ 60).ToString & " :mn " & (timeellapse Mod 60).ToString & " :sec" timeellapse -= 1 If timeellapse = 0 Then Timer1.Stop() End If End Sub