I have a few controls (group boxes, tables, gridview, etc.) in my C# Windows Forms application, and I would like to scale them based on screen width/height.
For exam
I believe you want the control's Anchor
property.
As the name implies, this property forces the control to anchor itself in a relative or absolute position within the parent form or control. This property has four values that can be turned on or off:
Top -- Indicates that the control should keep its top edge stationary in respect to the parent form (or control) top edge. Bottom -- Indicates that the control should keep its bottom edge stationary in respect to the parent form (or control) bottom edge. Left -- Indicates that the control should keep its left edge stationary in respect to the parent form (or control) left edge. Right -- Indicates that the control should keep its right edge stationary in respect to the parent form (or control) right edge.
IIRC, you want to select all the controls on the form using Ctrl+A, and then setting the anchor property to top, bottom, left, and right.