KeyPressEventArgs Constructor
Collapse the table of content
Expand the table of content

KeyPressEventArgs Constructor (Char)


Initializes a new instance of the KeyPressEventArgs class.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public KeyPressEventArgs(
	char keyChar


Type: System.Char

The ASCII character corresponding to the key the user pressed.

Use the Control.ModifierKeys property to get the current state of the modifier keys.

The following example displays a message box that shows the current state of the SHIFT key.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft