You might surround your controls with a groupbox and then set the readonly
property of the groupbox to true which would make all controls inside the
groupbox read-only as well.
good luck
> How to make all controls disable foreColor and BackColor same as ReadOnly =
> true?
[quoted text clipped - 5 lines]
> to "xxx.ReadOnly = true". It also spend more time to retest program. Help
> Help Help.
Serpent - 09 Aug 2006 13:35 GMT
well, if u really need a generic method, you can do the following.
1) add reference of System.Reflection
2) and in your code, where you are performing
initialization add.
Assembly l_oAssembly =
Assembly.GetExecutingAssembly();
Types[] l_oTypes = l_oAssembly.GetTypes();
This array of Types is a collection of all the
propertise of your Running application. Select the appropriate type and
call "GetPropertise()" function to get the propertyInfo array. From
there, Set any value you like by calling "SetValue" function. It is by
far the best and most general method to change propertises.
> You might surround your controls with a groupbox and then set the readonly
> property of the groupbox to true which would make all controls inside the
[quoted text clipped - 11 lines]
> > to "xxx.ReadOnly = true". It also spend more time to retest program. Help
> > Help Help.