Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
Is your NotifyIcon a member of the startup form? If so it would just be a matter of calling this.Close() from whatever event you choose to handle. Normally you would attach a ContextMenu or ContextMenuStrip (please specify your version in future) to the NotifyIcon with an Exit item, then handle the Click event of that menu item. If your Notifyicon is not a member of your startup form then you call Application.Exit as sunburnt suggested. Just note that no Closing or Clsed events will be raised on your forms in this case. In C# 2.0 the FormClosing and FormClosed events will be raised though.