NotifyIcon コントロールをフォームに追加し、FormClosing のイベント ハンドラーを追加します。
private void Form1_FormClosing(Object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.Visible = false;
this.notifyIcon1.Visible = true;
}
}