Usercontrol don't raises keyDown event

R

Ronchese

Hi All.

I'm developing a usercontrol that have no controls inside him, just showing
scrollbars when needed. All the rest of interface is done with graphics
object.

The problem is, now I need to capture keyboard events inside the control,
but it not raises so I can work with the keys.

(for sample, if there are scrollbars visible and I press
Up/Left/Right/Bottom keys, a scrollbar get focus. If there are no scrollbars
visible, the focus is transfered to next control of the form that is hosting
my usercontrol)

How can I fix that?

Ps.: I'm using Framework 1.1


[]s
Cesar
 
R

Ronchese

Found it! Just needed override the IsInputKey() method and it is done!

[]s
Cesar



"Ronchese" <[email protected]> escreveu na mensagem
Hi All.

I'm developing a usercontrol that have no controls inside him, just showing
scrollbars when needed. All the rest of interface is done with graphics
object.

The problem is, now I need to capture keyboard events inside the control,
but it not raises so I can work with the keys.

(for sample, if there are scrollbars visible and I press
Up/Left/Right/Bottom keys, a scrollbar get focus. If there are no scrollbars
visible, the focus is transfered to next control of the form that is hosting
my usercontrol)

How can I fix that?

Ps.: I'm using Framework 1.1


[]s
Cesar
 

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