托盘显示
private void niKE()
{ShowInTaskbar = true;
this.notifyIcon1.Visible = false;
Show();
WindowState = FormWindowState.Normal;
}
//Notifylcon双击事件
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
niKE();
}
contextmenuStrip(关联)
private void 缩小ToolStripMenuItem_Click(object sender, EventArgs e)
{
托盘状态
WindowState = FormWindowState.Minimized;ShowInTaskbar = false; //不显示在系统任务栏
this.notifyIcon1.Visible = true; //托盘图标可见
// niKE_DoubleClick();
}