)
最小化按钮private void btnMinimize_Click( object sender, EventArgs e ) { this.WindowState FormWindowState.Minimized; notifyIcon1 new NotifyIcon( ); notifyIcon1.Icon this.Icon; notifyIcon1.MouseDoubleClick NotifyIcon1_MouseDoubleClick; }窗体最小化与还原触发事件private void Mainwindow_Resize( object sender, EventArgs e ) { if (this.WindowState FormWindowState.Minimized) { notifyIcon1.Visible true; } else { this.Show( ); notifyIcon1.Visible false; } }NotifyIcon 控件双击事件private void NotifyIcon1_MouseDoubleClick( object sender, MouseEventArgs e ) { this.Show( ); notifyIcon1.Visible false; this.WindowState FormWindowState.Normal; }