C#怎样才能实现窗体最小化到托盘呢?
程序员文章站
2022-06-08 22:30:10
private void form1_resize(object sender, system.eventargs e)&...
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# 判断是不是非负数
下一篇: 再谈PHP从入门到精通需要几年