NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

KeyEventArgs Class

Provides data for the System.WinForms.Control.KeyDown or System.WinForms.Control.KeyUp event.

Object
   EventArgs
      KeyEventArgs

[Visual Basic]
Public Class KeyEventArgs
   Inherits EventArgs
[C#]
public class KeyEventArgs : EventArgs
[C++]
public __gc class KeyEventArgs : public EventArgs
[JScript]
public class KeyEventArgs extends EventArgs

Remarks

A KeyEventArgs, which specifies the key the user pressed and whether any modifier keys (CTRL, ALT, and SHIFT) were pressed at the same time, is passed with each System.WinForms.Control.KeyDown or System.WinForms.Control.KeyUp event.

The System.WinForms.Control.KeyDown event occurs when the user presses any key. The System.WinForms.Control.KeyUp event occurs when the user releases the key. Duplicate System.WinForms.Control.KeyDown events occur each time the key repeats, if the key is held down, but only one System.WinForms.Control.KeyUp event is generated when the user releases the key.

A System.WinForms.Control.KeyPress event also occurs when a key is depressed. A KeyPressEventArgs is passed with each System.WinForms.Control.KeyPress event, and specifies the character that was composed as a result of each key press.

For information about the event model, see TBD.

Requirements

Namespace: System.WinForms

Assembly: System.WinForms.dll

See Also

KeyEventArgs Members | System.WinForms Namespace | OnKeyDown | System.WinForms.Control.KeyDown | OnKeyUp | System.WinForms.Control.KeyUp | KeyPressEventArgs | OnKeyPress | System.WinForms.Control.KeyPress