Monthly Archives: June 2012

Handle key events at windows form level in C#

1. In the form constructor: this.KeyPreview = true; //Enable form-level keyboard event handling. 2. Populate the form’s KeyDown event handler. This event occurs before KeyPress, TextChanged, and KeyUp. private void frmSimpleValidator_KeyDown(object sender, KeyEventArgs e) {     ValidateFormKeydown(this, e); } 3. … Continue reading

Posted in Parenting | Tagged , | Leave a comment