Link to home
Start Free TrialLog in
Avatar of jppinto
jppintoFlag for Portugal

asked on

Check control focus and change backcolor

Hello Experts,

I was wondering if there is a easy way of doing this.

I would like to change the BackColor of the control on a windows Form that has the focus. When the control has the Focus, I would like the BackColor to be say Yellow; when the control looses focus I would like the BackColor to go back to White.

I know I could use the GotFocus event of each control but If I have 20 controls on a form that would not be a good pratice to do like that.

Thanks for your sugestions.

jppinto
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jppinto

ASKER

Hello Idle_Mind,

Your solution is perfect (as always!). Thanks,

jppinto