日期:2014-05-17 浏览次数:20954 次
private void normalForm()//恢复
{
this.Visible = true;
this.WindowState=FormWindowState.Normal;
}
private void minForm()//隐藏
{
WindowState = FormWindowState.Minimized;
this.Visible = false;
this.notifyIcon1.Visible = true;
}
private void Form1_SizeChanged(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.Visible = false;//隐藏窗体
this.notifyIcon1.Visible = true;//显示托盘图标
this.notifyIcon1.Text = this.Text;//设置托盘文本
}
}