代码如下:控件的大小变化了,但是不知为何,form的大小就是死活不动。
private void Form1_KeyDown(object sender, KeyEventArgs e)
{ if (e.KeyCode.ToString() == "Escape") {
Application.Exit();
} if (e.KeyCode.ToString() == "D")
{
aswf1.Width = this.Width / 2;
aswf1.Height = this.Height / 2;
this.Width = this.Width/2;
this.Height = this.Height / 2;
}
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{ if (e.KeyCode.ToString() == "Escape") {
Application.Exit();
} if (e.KeyCode.ToString() == "D")
{
aswf1.Width = this.Width / 2;
aswf1.Height = this.Height / 2;
this.Width = this.Width/2;
this.Height = this.Height / 2;
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货