Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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(
	wchar_t keyChar
)

Parameters

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
Show:
© 2017 Microsoft