How to make control unfocusable

  • Thread starter Thread starter Charles Jenkins
  • Start date Start date
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?
 
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.
 
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?
 
Back
Top