Skip to content

Commit

Permalink
Hide window from alt-tab menu when application is started minimized
Browse files Browse the repository at this point in the history
  • Loading branch information
troyhayes committed Dec 18, 2021
1 parent 40348f8 commit 58d5aa3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,17 @@ private void Form1_Resize(object sender, EventArgs e)
//hide it from the task bar
if (this.WindowState == FormWindowState.Minimized)
{
Hide();
this.Visible = false;
this.Opacity = 0;
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
this.ShowInTaskbar = false;
}
else if (this.WindowState == FormWindowState.Normal)
{
this.Visible = true;
this.Opacity = 100;
this.FormBorderStyle = FormBorderStyle.FixedSingle; //or whatever it was previously set to
this.ShowInTaskbar = true;
}
}

Expand Down

0 comments on commit 58d5aa3

Please sign in to comment.