How to highlight control with focus

  • Thread starter Thread starter swarfmaker
  • Start date Start date
S

swarfmaker

I would like to be able to highlight each control on my forms at it receives
the focus. I could do this by changing the properties of each control
individually, but that is a lot of work. Is it possible to write a routine
that I can call from each form to do this ?

thanks for any help offered
Iain
 
swarfmaker said:
I would like to be able to highlight each control on my forms at it
receives the focus. I could do this by changing the properties of
each control individually, but that is a lot of work. Is it possible
to write a routine that I can call from each form to do this ?

thanks for any help offered
Iain

Easy way that requires zero code...

Make all controls have a background color that contrasts with the background of
the form and then set the BackStyle property for all of them to transparent.

That will make all controls appear the same color as the form except for the one
with focus because the transparent property is ignored for the control with
focus.
 
Rick Brandt said:
Easy way that requires zero code...

Make all controls have a background color that contrasts with the
background of the form and then set the BackStyle property for all of them
to transparent.

That will make all controls appear the same color as the form except for
the one with focus because the transparent property is ignored for the
control with focus.
Nice one!!
Many thanks
 
Back
Top