keypreview

KeyPreview not handling KeyUp Event before control does.

I have a form, myForm, which has KeyPreview set to true. The idea is that I want to capture CTRL-Enter and fire the submit button of the form, no matter what textbox (or other control) that may have focus. So I set up this method: private void myForm_KeyUp(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.Enter) ...