实现效果:
知识运用:
窗体的WindowState属性 和FormBorderStyle属性
实现代码:
private void Form1_MouseDoubleClick(object sender, MouseEventArgs e) { bool Validate=(this.WindowState==FormWindowState.Maximized); if(Validate){ this.FormBorderStyle = FormBorderStyle.Sizable; this.WindowState = FormWindowState.Normal; }else{ this.FormBorderStyle = FormBorderStyle.None; this.WindowState = FormWindowState.Maximized; } }
原文地址:https://www.cnblogs.com/feiyucha/p/10123316.html
时间: 2024-11-05 19:16:40