cdc

导航

C#怎样才能实现窗体最小化到托盘呢?

Posted on 2006-04-03 19:45  Chris Chen  阅读(1815)  评论(2)    收藏  举报
private void Form1_Resize(object sender, System.EventArgs e) {
if (this.WindowState == FormWindowState.Minimized) {
this.Visible = false;
this.notifyIcon1.Visible = true;
}
}

private void notifyIcon1_Click(object sender, System.EventArgs e) {
this.Visible = true;
this.WindowState = FormWindowState.Normal;
this.notifyIcon1.Visible = false;
}