It's been a while since I've programmed a GUI program, so this may end up being super simple, but I can't find the solution anywhere online.
Basically my problem is that when I maximize my program, all the things inside of the window (buttons, textboxes, etc.) stay in the same position in the window, which results in a large blank area near the bottom and right side.
Is there a way of making the the elements in the program to stretch to scale?
Desktop shortcut icon: Right-click the shortcut icon and select Properties from the drop-down menu that appears. Taskbar shortcut icon: Forcing these applications to open as maximized requires an additional step. Right-click the shortcut icon in the Windows taskbar, then right-click the program itself.
Minimize button enables users to minimize the window to the taskbar. To remove minimize button we have to set the MinimizeBox property to false of the windows form. Now when you open the windows form you will notice the windows form's minimize button is in disable mode in the windows form.
Maximize allows the user to enlarge a window, usually making it fill the entire screen or the program window where it is contained. When a window is maximized, it cannot be moved until it is reduced in size using the Restore button.
You want to check and properly set the Anchor and Dock properties on each control in the Form. The Anchor property on a control tells which sides of the form (top, bottom, left, right) the control is 'anchored' to. When the form is resized, the distance between the control and its anchors will stay the same. This lets you make a control stay in the bottom right corner for example.
The Dock property instructs the control to fill the entire parent form or to fill one side of it (again top, bottom, left or right).
Anchor and Dock properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With