D
D Witherspoon
My application takes 5 or 6 seconds to load because of the time required to
communicate with web services and load from the database. In the meantime
I'd like to show a splash screen in a seperate thread.
I am trying the following code and it shows the form for a split second and
then dissapears. Can someone help me out with what I'm doing wrong here.
Thanks,
Dan
Public Sub Main()
Dim t As New System.Threading.Thread(AddressOf OpenSplash)
t.IsBackground = False
t.ApartmentState = Threading.ApartmentState.STA
t.Start()
'do tons of work when loading app 'cut for brevity.. 'takes 5-7 seconds
of loading time
'CloseSplash
End Sub
Public Sub OpenSplash()
fSplash = New frmSplash
fSplash.Visible = True
fSplash.Show
End Sub
communicate with web services and load from the database. In the meantime
I'd like to show a splash screen in a seperate thread.
I am trying the following code and it shows the form for a split second and
then dissapears. Can someone help me out with what I'm doing wrong here.
Thanks,
Dan
Public Sub Main()
Dim t As New System.Threading.Thread(AddressOf OpenSplash)
t.IsBackground = False
t.ApartmentState = Threading.ApartmentState.STA
t.Start()
'do tons of work when loading app 'cut for brevity.. 'takes 5-7 seconds
of loading time
'CloseSplash
End Sub
Public Sub OpenSplash()
fSplash = New frmSplash
fSplash.Visible = True
fSplash.Show
End Sub