Funny, I just went through this myself. Here's how I went about it:
First declare the Tray Icon (and Context Menu if you want one):
private System.Windows.Forms.NotifyIcon s_TrayIcon;
private System.Windows.Forms.ContextMenu ctxMenu;
In InitializeComponent():
this.s_TrayIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.ctxMenu = new System.Windows.Forms.ContextMenu();
//
// s_TrayIcon
//
this.s_TrayIcon.ContextMenu = this.ctxMenu;
this.s_TrayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("s_TrayIcon.Icon"

));
this.s_TrayIcon.Text = "Tool Tip";
this.s_TrayIcon.Visible = true;
this.s_TrayIcon.DoubleClick += new System.EventHandler(this.s_EventHandler);
I have a seperate function for initializing the Context Menu, but it's basically this:
private void InitializeContextMenu()
{
ctxMenu.MenuItems.Add( new MenuItem("lauch", new EventHandler(launch)));
ctxMenu.MenuItems.Add( new MenuItem("Check Now", new EventHandler(CheckNowEvent)));
ctxMenu.MenuItems.Add( new MenuItem("Settings", new EventHandler(OnOpen)));
ctxMenu.MenuItems.Add( new MenuItem("-"

);
ctxMenu.MenuItems.Add( new MenuItem("Exit", new EventHandler(OnExit)));
}
Then the only thing left is to trap the users exit. I've done the same as MSN messenger and removed the minimize and maximize buttons, and then trapped the on_exit event. I did this by adding
this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
to initializeComponent, and then adding:
private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
this.ShowInTaskbar = false;
this.Visible = false;
e.Cancel = true;
}
And then one of the event handlers for the context menu reverses this process. I think that should be enough to get you going. Let me know if you need anything else, or if anybody out there has any suggestions on how to do this better as I'm still pretty new to it =)