This is sort of hard to find, so I figure I’d post it.
Let’s say you have a windows application in C# and you want to do the whole notify icon thing. Here’s a trick so when you minimize your window, it doesn’t show up in the taskbar.
protected override void OnResize(EventArgs e)
{
if ( this.WindowState == FormWindowState.Minimized)
this.Hide();
base.OnResize(e);
}
private void notifyIcon_DoubleClick(object sender, System.EventArgs e)
{
this.Show();
this.WindowState = FormWindowState.Normal;
this.Visible = true;
this.Focus();
this.BringToFront();
}
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment