I currently have all the usual components inside a panel in a form, but how can I have it so when I resize the form it will move the components with it?
I already tried
this.panel1.size = new System.Drawing.Size(this.form.size.width, this.form.size.height);
but it didn’t work
try setting Anchor or Dock of the panel.The nachor property has 4 possible states Top, Right,Left, Bottom. These states can be combined. IF you set all 4 to panel it wiil resize with the from. Dock is more or less like Anchor jsut experiment with different combinations to see if you can get waht you want. IF what you whant is very complex and can not be done with simple Anchor or Dock you can attach to evnet of the from SizeChanget and calculate the new size of the panel.