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

Splash screen

P: n/a
Hi

I have a main sub as start-up. I need to display a splash screen and while
it is displayed I need to do some stuff in the background like opening db
connections etc. After that is done I need to close splash and open a login
form. Can anyone give me a code example of how to do this elegantly?

Thanks

Regards
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi

I have a main sub as start-up. I need to display a splash screen and while
it is displayed I need to do some stuff in the background like opening db
connections etc. After that is done I need to close splash and open a
login form. Can anyone give me a code example of how to do this elegantly?

Thanks


I don't know how "elegant" this is, but it's one way to do it. In your
sub-main module:

Public Shared Sub Main()

'Load Splash
splashForm = New Splash
splashForm.Show()

'Setup Data Access Layer
'blah blah blah

'Setup Business Layer
'blah blah blah

'Load GUI
mainForm = New FormMain
Application.Run(mainForm)

End Sub

In the FormMain Load event:

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

'Do some stuff
splashForm.Update()

'Ready to present GUI to end-user
splashForm.Close()

End Sub

I hope this helps, good luck.

Carl
Nov 21 '05 #2

P: n/a
this would potentially cause a rendering problem if user does anything
during load time (such as drag another app window across loading app).
Threading is ideally needed.
br,
Mark.
"Vagabond Software" <vagabondsw-X-@-X-gmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi

I have a main sub as start-up. I need to display a splash screen and
while it is displayed I need to do some stuff in the background like
opening db connections etc. After that is done I need to close splash and
open a login form. Can anyone give me a code example of how to do this
elegantly?

Thanks


I don't know how "elegant" this is, but it's one way to do it. In your
sub-main module:

Public Shared Sub Main()

'Load Splash
splashForm = New Splash
splashForm.Show()

'Setup Data Access Layer
'blah blah blah

'Setup Business Layer
'blah blah blah

'Load GUI
mainForm = New FormMain
Application.Run(mainForm)

End Sub

In the FormMain Load event:

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

'Do some stuff
splashForm.Update()

'Ready to present GUI to end-user
splashForm.Close()

End Sub

I hope this helps, good luck.

Carl

Nov 21 '05 #3

P: n/a
Hi John, I was going to code an example for you, but after a quick search
there are loads of great examples - you can try from google using "splash
screen c#"

Here is one such example
http://www.codeproject.com/csharp/Pr...lashScreen.asp

Using Threading is the key.

Br,

Mark.

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi

I have a main sub as start-up. I need to display a splash screen and while
it is displayed I need to do some stuff in the background like opening db
connections etc. After that is done I need to close splash and open a
login form. Can anyone give me a code example of how to do this elegantly?

Thanks

Regards

Nov 21 '05 #4

P: n/a
"John" <Jo**@nospam.infovis.co.uk> schrieb
Hi

I have a main sub as start-up. I need to display a splash screen and
while it is displayed I need to do some stuff in the background like
opening db connections etc. After that is done I need to close
splash and open a login form. Can anyone give me a code example of
how to do this elegantly?

http://people.freenet.de/armin.zingl...adedSplash.zip
Armin
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.