I am a novice at VB.Net. I am using Microsoft Visual Basic 2005 Express Edition. I designed a very basic splash screen. I am using the timer control to display the splash screen for only 5 seconds. I need the number of seconds left to be displayed on the splash screen before it closes. Basically a countdown from 5 to 1. How do I do this? Is there a way to make the timer control visable on the form and that will create my desired effect? Please help me. Thanks

9 Years
Discussion Span
Last Post by Jx_Man

use timer & progress bar.

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ProgressBar1.Value += 1

        If ProgressBar1.Value <= 20 Then

            Label1.Text = "5"

        ElseIf ProgressBar1.Value <= 40 Then

            Label1.Text = "4"

        ElseIf ProgressBar1.Value <= 60 Then

            Label1.Text = "3"

        ElseIf ProgressBar1.Value <= 80 Then

            Label1.Text = "2"

        ElseIf ProgressBar1.Value <= 99 Then

            Label1.Text = "1"
        End If
        If ProgressBar1.Value = 100 Then
            Label1.Text = "Time's Up"
        End If
    End Sub
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.