比如说一个窗体上有一个textBox
private void Form1_Load(object sender, System.EventArgs e)
{
this.oldHeight = this.Height - this.textBox1.Height ;
this.oldWidth = this.Width - this.textBox1.Width ;
this.oldLocation = this.textBox1.Location ;
}
private void Form1_Resize(object sender, System.EventArgs e)
{
this.textBox1.Height = (this.Height - this.oldWidth) ;
this.textBox1.Width = (this.Width - this.oldWidth) ;
this.textBox1.Location = new Point(this.oldLocation.X,this.oldLocation.Y);
}