System.Windows.Forms.ComboBox.OnKeyPress Method

Raises the Control.KeyPress event.

Syntax

protected override void OnKeyPress (KeyPressEventArgs e)

Parameters

e
A System.Windows.Forms.KeyPressEventArgs that contains the event data.

Remarks

If the value of the KeyPressEventArgs.KeyChar property of e is Keys.Return or Keys.Escape and the ComboBox.DroppedDown property is true, the ComboBox.OnKeyPress(KeyPressEventArgs) method sets ComboBox.DroppedDown to false.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0