By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,163 Members | 1,458 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,163 IT Pros & Developers. It's quick & easy.

Splash screens / loading & unloading forms

P: n/a
In a new project I'm creating, I have my first form that loads being used as
a splash screen, with a timer that activates after 5 seconds. I then want
the main form to load. However, it isn't allowing me to use frmMain.Load().
What can I use to load the main form, then unload the splash screen? Or
should I, perhaps, load an invisible control form that first loads the
splash screen, waits five seconds, then unloads it and loads the main form?
This might be a nice idea, since I may want to have other forms load and
unload... how can I get forms to be loaded and unloaded at will from an
invisible master form, say, frmControl? Thanks in advance for any
suggestions!

-- Eric
Feb 20 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Eric,

This is what I do:-

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

Me.Hide()

Dim splash As frmSplash

splash = New frmSplash

splash.Show()

splash.Update()

Thread.Sleep(2500)

splash.Close()

Me.Visible = True

End Sub

Cheers
Peter

"Eric A. Johnson" <no*****@dontlookforme.com> wrote in message
news:5r******************@newssvr14.news.prodigy.c om...
In a new project I'm creating, I have my first form that loads being used
as a splash screen, with a timer that activates after 5 seconds. I then
want the main form to load. However, it isn't allowing me to use
frmMain.Load(). What can I use to load the main form, then unload the
splash screen? Or should I, perhaps, load an invisible control form that
first loads the splash screen, waits five seconds, then unloads it and
loads the main form? This might be a nice idea, since I may want to have
other forms load and unload... how can I get forms to be loaded and
unloaded at will from an invisible master form, say, frmControl? Thanks
in advance for any suggestions!

-- Eric

Feb 20 '06 #2

P: n/a
Eric,

There are probably thousand of ways to make a splash screen.

However the last thing you have to do is know to use the right instructions.
"Form.Load" is an event that fires as soon as a form start loading and will
not start showing a form. You get the instructions for that when you click
on your form.

Therefore I think it is better for you to just create your program and know
how that goes and than afterwards add a splash screen, something that is if
your program is OOP seldom a problem.

Just my thought,

Cor

Feb 20 '06 #3

P: n/a
Added sample to follow up message

Cor
Feb 21 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.