title: c# reshow window by click on notifyicon
body: <p>I'm new with c# but know c++ and c, my problem is that I can't get my form to show up again after it got minimized to the system tray.</p>
  
  <p>That's the code I used to hide it:</p>
  
  <pre><code>    protected override void OnResize(EventArgs e)
      {
          base.OnResize(e);
  
          bool cursorNotInBar = Screen.GetWorkingArea(this).Contains(Cursor.Position);
  
          if (this.WindowState == FormWindowState.Minimized &amp;&amp; cursorNotInBar)
          {
              this.ShowInTaskbar = false;
              notifyIcon.Visible = true;
              this.Hide();
          }
      }
  </code></pre>