Application window sent behind other windows on closing different thread (C#)

Posted by david.murrant on Stack Overflow See other posts from Stack Overflow or by david.murrant
Published on 2008-10-10T17:19:20Z Indexed on 2010/05/29 2:42 UTC
Read the original article Hit count: 158

I'm writing a Windows Forms Application in C#.NET

On startup, the application displays a splash screen which is running in a separate thread. Whilst the splash screen is showing, the main application is initialising.

Once the main application has finished initialising, the main form of the application is displayed, and the splash screen still shows over the top.

Everything so far is as expected.

Then, the Splash screen is closed, which causes that thread to exit. For some reason, at the point, the main application windows gets sent behind all other open Windows, notably the Windows Explorer window where you clicked the .exe file to run the application in the first place!

What could be causing the windows to suddenly jump "behind" like this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms