How To: Bring your program to the foreground on WM6
Sunday, January 13th, 2008This topic is one I have been spending some time studying.
How do you get your program to the foreground when a certain event accurse ?
The answer is quite simple actually, you just need to call a UI component. like:
MessageBox.Show("Show Me");
And it will show the top most form in your application. Another thing you can do is call a form with Show().
Now, for a little bonus I have for you the…
How to send it back to the background!
What we need to do here is to call Hide() on all the visible forms in our application, this will essentially cause all our UI to go to the background and will bring back the last active application.
A little hint, you might want to use what you learned, and combine it with the previous post ;].
Nadav