G
Guest
Hello all
I would like my Windows Forms C# application to exhibit the following behaviour
1. Display a Splash Screen, topmos
2. Display the main application MDI window behind this. Make sure it is properly visible
3. Load database data, etc. A relatively time consuming task
4. Remove Splash Scree
5. Display a modal Log On dialog over the top of the MDI windo
To me, the best way to do this is to write the code in the Main routine, but I can't get the behaviour I need
Code snippets such as
===============
splashForm = new SplashForm()
splashForm.Show()
splashForm.Refresh()
mainForm = new MainForm()
mainForm.Show()
mainForm.Refresh()
mainForm.LoadSettings()
splashForm.Close(
splashForm.Dispose()
Application.Run(mainForm)
===============
do display the splash form correctly, but of course the main form is not repainted if it happens to become invalidated by another application. Also, this does not do the Log on dialog
The following incomplete code works correctly in VB6
===============
Public Sub Main(
With frmSplas
.ZOrder
.Sho
.Refres
End Wit
Load frmMainParen
frmMainParent.Enabled = Fals
SystemSettingsInitialis
frmSplash.Hid
Unload frmSplas
frmMainParent.Enabled = Tru
Logo
end su
===============
How do I do this in C# please
Many thanks
And
I would like my Windows Forms C# application to exhibit the following behaviour
1. Display a Splash Screen, topmos
2. Display the main application MDI window behind this. Make sure it is properly visible
3. Load database data, etc. A relatively time consuming task
4. Remove Splash Scree
5. Display a modal Log On dialog over the top of the MDI windo
To me, the best way to do this is to write the code in the Main routine, but I can't get the behaviour I need
Code snippets such as
===============
splashForm = new SplashForm()
splashForm.Show()
splashForm.Refresh()
mainForm = new MainForm()
mainForm.Show()
mainForm.Refresh()
mainForm.LoadSettings()
splashForm.Close(
splashForm.Dispose()
Application.Run(mainForm)
===============
do display the splash form correctly, but of course the main form is not repainted if it happens to become invalidated by another application. Also, this does not do the Log on dialog
The following incomplete code works correctly in VB6
===============
Public Sub Main(
With frmSplas
.ZOrder
.Sho
.Refres
End Wit
Load frmMainParen
frmMainParent.Enabled = Fals
SystemSettingsInitialis
frmSplash.Hid
Unload frmSplas
frmMainParent.Enabled = Tru
Logo
end su
===============
How do I do this in C# please
Many thanks
And