Bring another processes Window to foreground when it has ShowInTaskbar = false
Posted
by Mongus Pong
on Stack Overflow
See other posts from Stack Overflow
or by Mongus Pong
Published on 2010-04-14T10:53:54Z
Indexed on
2010/04/14
11:13 UTC
Read the original article
Hit count: 218
We only want one instance of our app running at any one time. So on start up it looks to see if the app is running and if it is, it calls SetForegroundWindow on the Main Window.
This is all good and well ... for the most part..
When our app starts up it will show a Splash screen and a Logon form. Both of these forms have ShowInTaskBar = false.
Because of this, if you try to start up another copy of the app when the Logon form is showing, that Logon form is not brought to the front!
Especially as the user cant see anything in the taskbar as well, all they figure is that the app is duff and cannot start. There is no indication that there is another instance running.
Is there any way around this problem?
© Stack Overflow or respective owner