winform全屏问题 如何实现双击窗体任意地方即全屏,再双击就还原的效果?本人菜鸟,请大家多指教 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在双击事件里面写:if (this.WindowState == FormWindowState.Maximized) this.WindowState = FormWindowState.Normal;else this.WindowState = FormWindowState.Maximized; 如果双击的都是from本身,可以用1楼的方法,如果还要在其他组件中双击,就要处理一下 foreach (Control c in this.Controls){ c.DoubleClick += this.From_DoubleClick;} private void Form1_DoubleClick(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Maximized) { this.WindowState = FormWindowState.Normal; } else { this.WindowState = FormWindowState.Maximized; } } private void Form1_SizeChanged(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Maximized) { this.FormBorderStyle = FormBorderStyle.None; } else { this.FormBorderStyle = FormBorderStyle.Sizable; } } 求一个 做校验的算法 CruiseControl.NET 与 Tfs 配置问题 SQL里面用两个变量怎么不行? 问一个简单的行列转换的问题吧 多人SOCKET开发 高手帮忙弄个正则 有关Dropdownlist的小问题,怎么设置高度? 关于存取文件于数据库的问题,急 请教:静态变量和实理的问题?(性能方面) 在C#中如何调用外部控件中的事件,又如果使用事件中的数组参数???????????? 求教DataAdapter Fill!! sql server 2005和VS2008能同时安装吗?
this.WindowState = FormWindowState.Normal;
else
this.WindowState = FormWindowState.Maximized;
foreach (Control c in this.Controls)
{
c.DoubleClick += this.From_DoubleClick;
}
{
if (this.WindowState == FormWindowState.Maximized)
{
this.WindowState = FormWindowState.Normal;
}
else
{
this.WindowState = FormWindowState.Maximized;
}
} private void Form1_SizeChanged(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Maximized)
{
this.FormBorderStyle = FormBorderStyle.None;
}
else
{
this.FormBorderStyle = FormBorderStyle.Sizable;
}
}