General, Windows Forms Designer, Options Dialog Box

Enables you to change the default settings for the grids and other features of visual designers within Visual Studio. You can open the Options dialog box from the Tools menu.

  • Optimized Code Generation
    Enables optimized code generation. Some controls may not be compatible with this mode. For this change to take effect, Visual Studio must be closed and re-opened.

  • Grid Size
    Sets the spacing, in pixels, between horizontal and vertical gridlines on the designer. The default size is 8, 8. The maximum size is 200, 200.

  • LayoutMode
    Specifies the alignment system to use for layout. You can choose either SnapToGrid or Snaplines. For more information about snaplines, see Walkthrough: Arranging Controls on Windows Forms Using Snaplines.

  • Show Grid
    Specifies whether designers display the sizing grid. By default, the grid is on.

  • SnapToGrid
    Determines whether designers will snap objects and controls to the grid. In other words, the resizing and movement of elements on the designer are constrained to the GridSize increment when this feature is turned on. Having SnapToGrid turned on makes it easier to line up the various aspects of the user interface precisely, but limits the freedom with which one can place controls. By default, SnapToGrid is turned on. For information about how to set the size of the positioning grid on the form itself, see How to: Set Grid Options for All Windows Forms

  • ObjectBoundSmartTagAutoShow
    Determines whether controls and components will display smart tags. Not all controls and components support smart tags.

  • EnableRefactoringOnRename
    When set to true, a rename refactoring operation is performed when you rename a component from the Properties window or Document Outline window.

  • AutoToolboxPopulate
    Determines whether the Toolbox is automatically populated with components and controls build by your project. For more information, see Walkthrough: Automatically Populating the Toolbox with Custom Components.

See Also

Tasks

Walkthrough: Arranging Controls on Windows Forms Using Snaplines

Walkthrough: Automatically Populating the Toolbox with Custom Components

How to: Set Grid Options for All Windows Forms

How to: Arrange Controls with Snaplines and the Grid in Windows Forms