This documentation is archived and is not being maintained.

Windows Forms Designer

Allows you to add controls to a form, arrange them, and write code for their events. Using the designer you can:

  • Add components, data controls, or Windows-based controls to a form.
  • Double-click the form in the designer and write code in the Load event for that form, or double-click a control on the form and write code for the control's default event.
  • Edit a control's Text property by selecting the control and typing a name.
  • Adjust the placement of the selected control by moving it with the mouse or the ARROW keys. Similarly, adjust the placement more precisely using the CTRL and ARROW keys. Finally, adjust the size of the control by using the SHIFT and ARROW keys. For information about adjusting the placement of multiple controls at once, see Aligning Multiple Controls on Windows Forms.
  • Select multiple controls by using either SHIFT+ click or CTRL+click. Using SHIFT+ click, the first control selected is the dominant control when aligning or manipulating the size. Using CTRL+click, the last control selected is dominant, so the dominant control changes with every new control added. Alternatively, you can select a number of controls by clicking the form and dragging a selection rectangle around the controls that you want to select.

The Windows Forms Designer provides a rapid development solution for creating Windows applications. It is the locus of visual, client-based forms design. Controls may be dragged or drawn onto its surface from the Toolbox. The Toolbox tabs available to the Windows Forms Designer are the Windows Forms tab, the Data tab, and the Components tab. Non-visual components added to the Windows Forms Designer are placed on the tray below it in the development environment so that they are easily accessible without cluttering the visual design space. For more information on working with components such as these, see Adding Controls Without a User Interface to Windows Forms.

Additionally, by right-clicking the Windows Forms Designer, you get a menu that allows you to switch to the Code Editor, lock the controls to the form, or see the properties of the form. For more information on locking controls to the form, see Locking Controls to Windows Forms.

See Also

Windows Forms | What's New in Windows Forms and Controls | Toolbox | Properties Window | Code and Text Editor | Windows Forms Designer, Options Dialog Box | Setting Grid Options for All Windows Forms