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
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