I have a splash screen that is displayed before my logon form. If I eliminate the splash screen, the logon form is displayed topmost with focus.
However, adding the splash screen leaves logon form hidden behind other windows. Also, the taskbar button that appears for the logon form is blinking and the logon form is grey at the top of the window. The user must click on the form to begin typing.
I have also found that putting this.Activate, this.Focus, this.BringToFront, in the Load event for the Logon form are all ineffective.
It seems like I can't get .NET to forget whatever displaying the splash form did to the application state.
Thank you for any suggestions!
However, adding the splash screen leaves logon form hidden behind other windows. Also, the taskbar button that appears for the logon form is blinking and the logon form is grey at the top of the window. The user must click on the form to begin typing.
Code:
[STAThread]
private static void Main() {
Splash frmSplash = new Splash();
frmSplash.Show();
//Haven't I tried everything I can to get this out
//of memory?
frmSplash.Close();
frmSplash.Dispose();
frmSplash = null;
GC.Collect();
Logon frmLogon = new Logon();
//Logon form is not focused by the following
Application.Run(frmLogon);
}
I have also found that putting this.Activate, this.Focus, this.BringToFront, in the Load event for the Logon form are all ineffective.
It seems like I can't get .NET to forget whatever displaying the splash form did to the application state.
Thank you for any suggestions!