Jump to: navigation, search

Designing Forms in Visual Studio

943 bytes added, 15:06, 20 July 2007
Positioning and Sizing Controls Using the Grid
== Positioning and Sizing Controls Using the Grid ==
When adding controls to a form they are actually snapping into locations defined by a grid. Visual Studio has a grid active by default, but also has the grid invisible by default. Unless you were watcfhing carefully when adding controls you may not have even noticed the grid was being used.
There are a number of ways to configure the granularity and behavior of the Visual Studio grid. These settings are global in that, once defined, they apply to all forms and projects, not just to the current form or project. Note, also that for some reason, changes to the grid to not immediately take effect in forms in which you are already working.
Grid settings are changed using the Visual Studio ''Options'' screen. To access this screen, select ''Options...'' from the ''Tools'' menu. When the dialog appears, click on ''Windows Forms Designer'' in the left hand tree. Once selected the dialog should appear as follows:

Navigation menu