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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple splash screen

Status
Not open for further replies.

buddyel

MIS
Mar 3, 2002
279
US

I am trying to have my app start with a very simple splash screen. I have designed the form i want to use (frmSplash). I would like it to be displayed for maybe 2 or 3 seconds then open the mdiContainer (frmMain). I have tried a few things but they have not worked right. Any ideas?
 
Hello buddyel,
Set as a startup form your frmMain.
try the following:

-------------- frmMain ----------------

Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Hide()
Dim frm As frmSplash= New frmSplash()
frm.ShowDialog(Me)
End Sub



------------ frmSplash -----------------

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


Timer1 is a timer added to the form, enabled and the interval is set to the value that you want to wait (e.g. 2000 (msec) )

the frmSplash will be displayed just for 2 seconds and then the frmMain will appear back

Hope that this helps,
Camel
 
Just wanted to say thank you for this post. I have been struggling with this issue, and you solved it.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top