Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have developed a c# window application and now i want to change color of parent form controls when open popup window.

please help..........

thanks in advance
Posted

1 solution

Iterate through the Form.Controls collection (you'll probably have to do it recursively to cover container controls) and either set the Enabled property to false, or change the ForeColor and BackColor properties. You'll need to set them back when your popup closes.

This may not work for all controls - particularly if any of them are UserControls which don't expose their inner workings. For those, you will have to add the functionality to each control.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900