When designing the user interface of your Windows application, you can lock the controls once they are positioned correctly, so that you do not inadvertently move or resize them when setting other properties.
To lock a control
Additionally, you can lock all the controls on the form at once, which is helpful for forms with many controls. Once you have placed all the controls where you want them on the form, lock them all in place to prevent erroneous movement.
To lock all the controls on a form
- From the Format menu, choose Lock Controls.
Note This command locks the form's size as well, because a form is a control.
To unlock all locked controls on a form
To unlock locked controls individually
- Right-click the control and choose Lock Controls.
See Also
Windows Forms Controls | Controls by Category | Arranging Controls on Windows Forms | Labeling Individual Windows Forms Controls and Providing Shortcuts to Them | Controls You Can Use on Windows Forms | Windows Forms Controls by Function | Creating Windows Forms