I want to catch keyup event of parent form in a usercontrol. I use ProcessCmdKey but it just give me keydown event and it doesn't raise in keyup event. How can I do it?
Update: I want to catch keyup event of form. because Control.KeyUp raised when control is focused.
public partial class ExtendedButton : Button { const int WM_KEYDOWN = 0x100; public ExtendedButton() { InitializeComponent(); } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (msg.Msg == WM_KEYUP && keyData == (Keys.NumPad0)) { MessageBox.Show("hi"); } return base.ProcessCmdKey(ref msg, keyData); } }