0

I have a winform project with a splash form (as described in the first answer of this question : C# winforms startup (Splash) form not hiding).

When I use this splashform the mainform loose the focus. I want to bring it to the front as soon as I close the splashform with Form.BringToFront() but it does'nt work.

Anybody can help?

Community
  • 1
  • 1
Martin Delille
  • 11,360
  • 15
  • 65
  • 132
  • Once the splash form closes, the main form should automatically get focus again. Where is the focus going?? –  Aug 23 '10 at 16:53
  • 2
    Avoid reinventing that wheel: http://stackoverflow.com/questions/392864/c-splash-screen-problem – Hans Passant Aug 23 '10 at 17:54

1 Answers1

4

Raymond Chen just addressed this issue with Win32 programs in his blog today.

Basically, you need to show your main form and call BringToFront on it before closing your splashscreen.

Powerlord
  • 87,612
  • 17
  • 125
  • 175