The attached utility demonstrates a way of setting the state of a group of controls at the same time using the controls' Tag property.
The properties that can be controlled are: Visible, Enabled, Locked
However, some control types do not allow all of the properties.
For example labels can not be disabled or locked
For full details of control types & properties, see the table tblControlTypes
All the form controls have tags A, B, C or D.
Use the buttons to control the state of those with tags A, B, C
To ensure the form remains usable, controls with tag D remain visible, enabled & unlocked at all times!
The forms aren't intended to be elegant, just to show what can be done
For portability, all the functionality is now included in the module modControlState.
There are 3 procedures: ShowControls, EnableControls & LockControls
2 forms have been included - identical apart from colour
This is just to confirm that the forms are controlled independently as you would expect
In addition, one form demonstrates the use of auto resize code (by Jamie Czernak) for different screen resolutions; the other doesn't
To use this approach, just copy the module modControlState to your own project
Click the image to view a larger version ...