//使用类文件:System.Windows.Forms.NotifyIconSystem.Windows.Forms.ContextMenuSystem.Windows.Forms.MenuItemSystem.EventHandler//实例: //显示托盘图标 private void ShowNotifyIcon() ...{ //添加快捷菜单 ContextMenu cm = new ContextMenu(); MenuItem mi = new MenuItem("显示(&S)", new System.EventHandler(this.HideNotifyIcon)); cm.MenuItems.Add(mi); notifyIcon1.ContextMenu = cm; //显示托盘图标 notifyIcon1.Icon = this.Icon; //隐藏窗口 this.Hide(); } //隐藏托盘图标 private void HideNotifyIcon(object sender, EventArgs e) ...{ //藏托盘图标 notifyIcon1.Icon = null; //显示窗口 this.Show(); }