I've got a windows mobile app, which needs to keep running to do some task in the background.
To hide the app instead of closing it was easy:
protected override void OnClosing(CancelEventArgs e)
{
e.Cancel = true;
this.Hide();
base.OnClosing(e);
}
The problem: how do I show the app again, when the user starts it in the menu?
Windows Mobile does know the app is still running, so it does not start a second copy. Instead it just does nothing.
Is there any way for the app to get notified if it is started again, so the app can show it's gui?
Best Answer
You should use this:
The "Minimize" method should looks like in this blog post ( http://christian-helle.blogspot.com/2007/06/programmatically-minimize-application.html ).