I have written (mostly) with some take from a simple tutorial a calculator control for a program I am working on, the control works fine, except i would like the control to accept key input, like the windows calculator does, i.e. asterisk activates multiplication, enter evaluates and the numbers are number ect...
the control inherits from UserControl, and just contains the .net button controls.
since it inherits from UserControl it has the events for keyDown KeyUp and KeyPress.
the user control is contained in a tabcontrol, and is on a form that is a fixed tool window and an mdi child.
I would like for the control to accept keys when that tab is open and the toolwindow has focus. but alone, the usercontrol, even when focused the events don't fire.
I ended up just subscribing to the forms key events and calling the handlers on the usercontrol from there and just passing the eventargs on to the usercontrol, this didn't quite work... I failed to be able to handle the events so that the focus didn't jump around with the arrow keys, and the enter key just activates the focused button. also the enter key never fires any events.
I am just not sure where to go to from here. any suggestions would be appreciated.