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

Re: Splash screen by Vagabond

Vagabond
Sun Jul 17 20:35:24 CDT 2005

"John" <John@nospam.infovis.co.uk> wrote in message
news:ehWJkIviFHA.3608@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



Re: Splash screen by Mark

Mark
Mon Jul 18 03:12:20 CDT 2005

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:%23kGprjziFHA.3316@TK2MSFTNGP14.phx.gbl...
> "John" <John@nospam.infovis.co.uk> wrote in message
> news:ehWJkIviFHA.3608@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
>



Re: Splash screen by Mark

Mark
Mon Jul 18 03:15:11 CDT 2005

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/PrettyGoodSplashScreen.asp

Using Threading is the key.

Br,

Mark.

"John" <John@nospam.infovis.co.uk> wrote in message
news:ehWJkIviFHA.3608@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
>