NumericUpDown.OnTextBoxKeyPress(Object, KeyPressEventArgs) 方法

定义

引发 KeyPress 事件。Raises the KeyPress event.

protected:
 override void OnTextBoxKeyPress(System::Object ^ source, System::Windows::Forms::KeyPressEventArgs ^ e);
protected override void OnTextBoxKeyPress (object source, System.Windows.Forms.KeyPressEventArgs e);
override this.OnTextBoxKeyPress : obj * System.Windows.Forms.KeyPressEventArgs -> unit
Protected Overrides Sub OnTextBoxKeyPress (source As Object, e As KeyPressEventArgs)

参数

source
Object

事件源。The source of the event.

e
KeyPressEventArgs

包含事件数据的 KeyPressEventArgsA KeyPressEventArgs that contains the event data.

注解

NumericUpDown 控件只接受数字、负号、小数点和编辑击键,如 BACKSPACE。The NumericUpDown control accepts only digits, the negative sign, the decimal point, and editing keystrokes, such as BACKSPACE. 如果 Hexadecimal 属性设置为 true,则 NumericUpDown 接受十六进制数字。If the Hexadecimal property is set to true, NumericUpDown accepts hexadecimal digits.

适用于