语言

ComboBox.OnKeyPress(KeyPressEventArgs) 方法

定义

引发 KeyPress 事件。

protected:
 override void OnKeyPress(System::Windows::Forms::KeyPressEventArgs ^ e);
protected override void OnKeyPress(System.Windows.Forms.KeyPressEventArgs e);
override this.OnKeyPress : System.Windows.Forms.KeyPressEventArgs -> unit
Protected Overrides Sub OnKeyPress (e As KeyPressEventArgs)

参数

e
KeyPressEventArgs

包含事件数据的 A KeyPressEventArgs 。

注解

如果属性KeyChar的值为或e属性Return为 Escape,则DroppedDown方法将设置为 trueOnKeyPress 。DroppedDownfalse

适用于