C#怎样才能实现窗体最小化到托盘呢?
程序员文章站
2023-10-30 15:09:16
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;
}
上一篇: 在美一所中学里机器人代替生病儿童上学
下一篇: VBS教程:函数-Timer 函数