Click here to Skip to main content
15,843,145 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to extend time of splash screen in 2008?

I have 2 forms one is my main form(frmMain) and the other is my splash screen(frmSplash). In project properties I set the start form to frmMain and in splash screen frmSplash. When I run my project the splash screen display only 2 seconds. How can I extend the time?

thanks in advance.

add timer control on splash form
and on tick event put if condition when timer's time goes greater than desire time then close form and enable your MDI form

Happy coding!
Share this answer
Johnny J. 17-Apr-13 9:21am    
The OP wants to use the built in splash screen functionality instead of coding his own, so this is not a solution to the OP's question...
You can code this:

Private Sub SplashScreenForm_Shown(sender As Object, e As EventArgs) Handles Me.Shown
   Dim sw As New Stopwatch
   Do : Loop While sw.ElapsedMilliseconds < 3000
 End Sub
Share this answer
Thregarth 17-Apr-13 10:10am    
I think about writting this code in the Shown event, yout can ensure that the form with what you want to show, is being shown, after all controls are painted
Try this in your main form:

Public Class MainForm

    Private WithEvents tmr As New Timer

    Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        tmr.Interval = 5000
        tmr.Enabled = True

        Do While tmr.Enabled
    End Sub

    Private Sub tmr_Tick() Handles tmr.Tick
        tmr.Enabled = False
    End Sub

End Class
Share this answer
Johnny J. 17-Apr-13 9:42am    
Thanks phantom. Missed the code tags

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900