This is something that's been driving me up the wall: how can I get the Windows Forms designer to provide pixel snapping for the horizontal and vertical centers of the form I'm working on?
Do one of the following: On the Arrange tab, in the Table group, click the layout type you want for the new layout (Tabular or Stacked). Right-click the selected controls, point to Layout, and then click the layout type you want for the new layout.
From the Format menu, choose Center in Form. From the cascading menu, choose one of the following: Horizontally.
To achieve this select the form you want to start in the center screen then go to properties and set the Startposition property to CenterScreen.
You can resize individual controls, and you can resize multiple controls of the same or different kind, such as Button and GroupBox controls.
Visual Studio provides a number of tools to assist in aligning groups and sizing groups of controls in a form. These features are accessed using the layout toolbar. To display the layout toolbar right click on any part of the standard Visual Studio Toolbar and select Layout from the drop down menu. The resulting toolbar will appear as follows:
The Visual Studio Layout Toolbar
Select a group of components and click on the various buttons in the toolbar to see the effect. For example, all the controls can be left or right aligned and resized to the same size, width or height. It is also possible to equally space the controls, and then increase or decrease the spacing used to separate the controls. It is also possible place controls on top of one another and change which control appears on top of the stack (this can also be done in Visual Basic code using the BringToFront() and SendToBack() methods of the respective controls).
All together, the selection of controls allows just about any uniform layout to be achieved from a group of controls in a form.
http://www.techotopia.com/index.php/Designing_Forms_in_Visual_Studio
5th and 6th icon from the right end will do the trick for you:
Not quite automatic, but still works.
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