all key events not registering

A

Alien

Hi, I have a class that extends UserControl, and I'm attempting to capture
the keydown event, but it never fires when a key is pressed.

protected override void OnKeyDown(KeyEventArgs e) {
Console.WriteLine("keydown");
}

I've also tried overriding the OnKeyUp method, and using events to handle
this but still nothing is fired.
The control sits on a Form.

Anyone know what could be wrong?


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