How to duplicate focus rectangle behaviour?

T

Tony

Hi,

Does anyone know how to duplicate .Net or Windows focus rectangle behaviour
but with custom drawn user controls? The behaviour goes something like
this...

1. Create a WinForm with one or more Button controls on.
2. Run the form and click on any of the buttons.
3. Depending on your system's accessibility settings, you should not see
any focus rectangles on the buttons you've just clicked on.
4. Now hit the Tab key and repeat the process of clicking on any of the
buttons.
5. A focus rectangle should now be visible on every button you've just
clicked on.

I've tried using the ContainsFocus and Focused properties on my user
control, but they always return true. Is there any other way of determining
the exact time (after hitting the Tab key) during the life of a form when to
display a focus rectangle?

Many thanks in advance,
Tony.
 
H

Herfried K. Wagner [MVP]

* "Tony said:
Does anyone know how to duplicate .Net or Windows focus rectangle behaviour
but with custom drawn user controls? The behaviour goes something like
this...

1. Create a WinForm with one or more Button controls on.
2. Run the form and click on any of the buttons.
3. Depending on your system's accessibility settings, you should not see
any focus rectangles on the buttons you've just clicked on.
4. Now hit the Tab key and repeat the process of clicking on any of the
buttons.
5. A focus rectangle should now be visible on every button you've just
clicked on.

<http://msdn.microsoft.com/library/e...rInterface/UserInput/KeyboardAccelerators.asp>
 
T

Tony

Thank you Herfried. Your response led me to this...

public event UICuesEventHandler ChangeUICues;
 

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