"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