How to highlight control with focus

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
 
R

Rick Brandt

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.
 
S

swarfmaker

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top