WinForm suddenly doesn't respond to keyevent.
At first WinForm the keyevent is effective.
When you use some controls to set its mouseevent, WinForm suddenly does not respond to KeyEvent!!
This can be resolved as follows:
1, first set the Form.keypreview to true to try.
The role of KeyPreview is to determine whether keyboard events on controls on a form have been registered with the form. I press the above settings, the form of the KeyEvent and live again.
If not, press 2.
2. This function needs to be overloaded
protected override bool processDialogKey (Keys keyData)
Reference documents:
Http://m.myexception.cn/c-sharp/78949.html
http://www.bkjia.com/PHPjc/1104551.html www.bkjia.com true http://www.bkjia.com/PHPjc/1104551.html techarticle WinForm suddenly did not respond to keyevent the first WinForm KeyEvent was effective. When you use some controls to set its mouseevent, WinForm suddenly does not respond to KeyEvent!! You can follow the steps below ...