C#怎样才能实现窗体最小化到托盘呢?
更新时间:2007年03月09日 00:00:00 作者:
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;
}
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;
}
相关文章
C# DateTime.Now.ToString() 用法示例讲解
这篇文章主要介绍了C# DateTime.Now.ToString() 用法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧2024-01-01
最新评论