Sizing a Control While You Add It

 

The latest version of this topic can be found at Sizing a Control While You Add It.

To size a control while you add it

  1. Select a control in the Toolbox Window.

  2. Place your cursor (which appears as cross hairs) where you want the upper-left corner of the new control to be on your dialog box.

  3. Click and hold down the mouse button to anchor the upper-left corner of your control on the dialog box, then drag the cursor to the right and down until the control is the size you want.

    Note

    You can actually anchor any of the four corners of the control you're drawing. This procedure used the upper-left corner as an example.

  4. Release the mouse button. The control settles onto the dialog box in the size you specified.

    Tip

    You can resize the control after dropping it onto the dialog box by moving the sizing handles on the border of the control. For more information, see Sizing Individual Controls.

For information on adding resources to managed projects, please see Resources in Applications in the .NET Framework Developer's Guide. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resources strings to properties, see Walkthrough: Localizing Windows Forms and Walkthrough: Using Resources for Localization with ASP.NET.

Requirements

Win32

See Also

Controls in Dialog Boxes
Adding Event Handlers for Dialog Box Controls
Dialog Box Controls and Variable Types