Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a Splash Screen from a Form

Status
Not open for further replies.

tekrobg

Programmer
Oct 12, 2004
42
US
I am going to try a new route since I can't get the splash screen working with a Module and a Sub Main. Now I've put this code into the load event for a form and designated the form as the startup object. Now the FormSplash should start and maintain itself for 3 seconds, then close and open Form1 ready for the user. This is a five form project linked by "Next" buttons on each form.

vb/
Private Sub FormSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Application.DoEvents()
Threading.Thread.Sleep(3000)
Dim f As New Form1()
f.ShowDialog()
Me.Close()
End Sub

When I run it, FormSplash doesn't show, 3 seconds elapses, then Form1 appears normal; however, when I click on the "Next" button, the program shuts down instead of going to Form2.
/vb

Thanks for any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top