获取窗体最大化后的width, height,该怎么解决
获取窗体最大化后的width, heightprivate void button1_Click(object sender, EventArgs e){int width1
获取窗体最大化后的width, height
private void button1_Click(object sender, EventArgs e)
{
int width1 = this.Width;
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
this.Update();
int width2 = this.Width;
}
问题:
现在width1 等于 width2,怎么得到窗体最大化后的width呢?谢谢!
[解决办法]this.WindowState = FormWindowState.Maximized;
Application.DoEvents();
int width2 = this.Width;