You can set the properties Form.MinimumSize and Form.MaximumSize, for example, the Forrm Load event:
this.MinimumSize = new Size(400, 0); this.MaximumSize = new Size(400, Screen.PrimaryScreen.Bounds.Height);
Or you can simply handle the form change event:
private void Form1_Resize(object sender, EventArgs e) { this.Width = 400; }
The first option is probably better, since it avoids flickering when resizing.
source share