Here’s a quick little tip that you are possibly familiar with, but may not have thought of incorporating into your normal work process.
Here’s the situation: you’ve designed this absolutely stunning user interface. It’s literally beautiful enough to make a grown man cry. All these wonderful controls arranged in perfect symmetry with the universe.
The latest request from management is to change the font on a bunch of them, and the background colours on some others. Seriously, doesn’t management know that they’re messing with Art (with a capital A) here? So begrudgingly, you switch to Design view and start changing the properties one by one. Unfortunately you don’t notice till right at the end - each time you’ve been selecting a control with the mouse you’ve been nudging it a couple of pixels out of alignment. By the end, your UI more closely resembles the work of Jackson Pollock rather than Leonardo da Vinci.
Fortunately we do have the Undo function, so all is not lost. However, Visual Studio provides us with a more elegant solution - locking controls. When a control is locked, you are prevented from moving or resizing them, but you can change any other property. Locked controls will show a small padlock icon on them when they are selected, as shown below.
Here’s my recommendation - as soon as you are happy with the layout of your form, lock the controls. If you select the Lock Controls command from Format menu, it will lock all controls on the form. It only takes a second, and if you learn to do it without thinking you might save yourself a small frustration down the track. And as Joel has taught us, small frustrations really start to add up over time. But then again, maybe this has never been a problem for you, in which case I’d say feel free to ignore me and get back to your Art!
In the interests of total honesty, I should point out that locked controls can still be Cut or Deleted, so the title for this blog post isn’t entirely accurate ![]()

