How to make control unfocusable

C

Charles Jenkins

I am making a control which will draw a function key legend. If the
user presses the proper keyboard key OR uses the mouse to click on the
function key legend, the key's event should fire.

Trouble is, the Compact Framework does not have the CanFocus() method.
Whenever I click on a legend, it gains the focus.

What can I do to make the focus stay wherever it already is even when
the user clicks on my custom control?
 
T

tamberg

Setting the "Enabled" property to false prevents a control from being
focusable. But as far as I know this also prevents mouse and keyboard
input.
 
C

Charles Jenkins

Setting the "Enabled" property to false prevents a control from being
focusable. But as far as I know this also prevents mouse and keyboard
input.

Well, I do want it to respond to clicks. Surely it is possible to make
controls respond to clicks without stealing the focus. Anyone know how?
 

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