| Processing the keyboard |
|
|
|
|
The keyboard can also be processed by overriding the appropriate method of the Control class. Here we overrride the method OnKeyDown which is called everytimes the user press a key.
The method OnKeyDown of the Control class expects a KeyEventArgs as argument. An object of the type KeyEventArgs has a KeyCode property which can be used for testing against the values of the Keys enumeration. Here we test for the Enter key and we display a message box when the user has pressed that key. |
| < Prev | Next > |
|---|














