I have an app that uses Forms with FormBorderStyle set to "None."
The issue with this is that if a user hits the "Show Desktop" button (which effectively minimizes all opened windows) and then restores one of the Forms from the taskbar, all of the borderless forms will be restored.
Note: If the form was explicitly minimized (i.e. WindowState = FormWindowState.Minimized) before the Show Desktop button is clicked, then it results in expected behavior for that particular form.
Also note that this is not the case for regular forms or even WPF windows without borders.
Form.Designer.cs:
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
Form.cs:
private void MinimizeButton_Click(object sender, EventArgs e)
{
// If minimized explicitly, form behaves appropriately
WindowState = FormWindowState.Minimized;
}
Any ideas on why this is the case/how to fix it?