Hello,
I know it is a old post but I all the solutions given here didn't worked for me.
However i found a trick to make this works :
FormWindowState keep_in_memory = this.WindowState;
private void MainPage_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
Hide();
this.WindowState = keep_in_memory;
}
else
{
keep_in_memory = this.WindowState;
}
}
private void notifyIcon_MP_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.Show();
this.Activate();
}
The trick is to keep in a variable the status of the windows before it minimize.
Then, after the windows is hiden, set the form to the memorized status.
This will made the form reopen as previously.
Hope this will help some of you :)