title: Minimize to tray
body: <p>my app is for chatting, and i think if someone needs to hide it quick, but doesn't want to close it, i came up with this:</p>
  
  <pre><code>private void button6_Click(object sender, EventArgs e)
  {
      this.WindowState = FormWindowState.Minimized; 
  }
  </code></pre>
  
  <p>however, instead of going to the taskbar, i want it to appear (no popup) in the tray, just the apps icon, and when someone clicks it it needs to set this</p>
  
  <pre><code>this.WindowState = FormWindowState.Normal; 
  </code></pre>
  
  <p>Is this possible, how?  </p>
  
  <p>Also by system tray i mean the one in the bottom right corner, next to the time</p>
  
  <p>I still can't get this to work, nothing appears in the notification bar if I do what you guys said (btw: this is the full code to minimise)</p>
  
  <pre><code>private void button6_Click(object sender, EventArgs e)
  {
      this.WindowState = FormWindowState.Minimized;
  
  
  }
  
  private void Form_Resize(object sender, EventArgs e)
  {
      if (WindowState == FormWindowState.Minimized)
      {
          this.Hide();
      }
  
  
  }
  
  private void notifyIcon_Click(object sender, EventArgs e)
  {
      this.Show();
      this.WindowState = FormWindowState.Normal;
  }
  </code></pre>
  
  <p>Why isn't this working?</p>