日期:2014-05-17 浏览次数:20769 次
private void pictureBox4_Click(object sender, EventArgs e)//最小化到托盘
{
pictureBox2.Visible = true;
pictureBox4.Visible = false;
this.Hide();
this.WindowState = FormWindowState.Minimized;//最小化
}
private void Form2_SizeChanged(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized) //判断是否最小化
{
//this.ShowInTaskbar = false; //不显示在系统任务栏
//notifyIcon1.Visible = true;//托盘图标可见
}
if (WindowState == FormWindowState.Normal)
{
pictureBox5.Visible = true;
}
}
public void notifyIcon1_Click(object sender, EventArgs e)//单击托盘图标还原窗口
{