代码如下:控件的大小变化了,但是不知为何,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;
            }
            
 
        }