void Form1_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)//判断是否是最小化操作
{
this.Hide();
this.notifyIcon1.Visible = true; //托盘图标可见
}
}
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.Show();
}
{
if (this.WindowState == FormWindowState.Minimized)//判断是否是最小化操作
{
this.Hide();
this.notifyIcon1.Visible = true; //托盘图标可见
}
}
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.Show();
}