hello i need a countdown timer that count from 10 to 0 and then give me a msg "win"....??

here is complete code:

here i only have a button on a form and a timer.

Public Class Form1
    Dim c As Integer = 0

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Timer1.Interval = 1000
        Me.Timer1.Enabled = True

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        c = c + 1

        If (c = 10) Then
            MessageBox.Show("win")
        End If
    End Sub
End Class

thank you "sandeepparekh9" my problem is solved:D:D

display the time in label and the time will be update every second in visual basic 2010 for online exam

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.