http://www.developer.com/net/net/article.php/3336751/C-Tip-Placing-Your-C-Application-in-the-System-Tray.htm
There are many cases when it's advantageous to place an application's icon in the System Tray. For example, firewall/antivirus and instant messaging applications do this so as to run in the background and still be accessible to the user without crowding up the task bar. In this week's installment of my .NET Tips and Techniques series, I'll show you the steps involved in specifying that an application is to be minimized to the Tray, how to allow the user to restore the application by double-clicking the icon and how to create and respond to a System Tray icon's context menu. At this point, your application will fuction perfectly in terms of an icon appearing in the System Tray when the application is run (see Figure 1), the application not appearing on the task bar when minimized and the application restoring itself when the Tray icon is double-clicked. Figure 1 Now, let's see the steps involved with adding a context menu to the icon. Figure 2
C# Tip: Placing Your C# Application in the System Tray
April 7, 2004
Tip: If you have a BMP file that you want to convert to an icon file, I highly recommend the QTam Bitmap to Icon 3.5 application.
private void Form1_Resize(object sender, System.EventArgs e)
{
if (FormWindowState.Minimized == WindowState)
Hide();
}
private void notifyIcon1_DoubleClick(object sender,
System.EventArgs e)
{
Show();
WindowState = FormWindowState.Normal;
}