InputPanel for WinForms帮助文档
KeyPress 事件 (InputComponent)






Fires when a key is pressed while the component has focus.
语法
'声明
 
<C1DescriptionAttribute("当当组件具有焦点时,按下一个按键时触发。")>
<C1CategoryAttribute("键盘")>
Public Event KeyPress As System.Windows.Forms.KeyPressEventHandler
'用法
 
Dim instance As InputComponent
Dim handler As System.Windows.Forms.KeyPressEventHandler
 
AddHandler instance.KeyPress, handler
[C1Description("当当组件具有焦点时,按下一个按键时触发。")]
[C1Category("键盘")]
public event System.Windows.Forms.KeyPressEventHandler KeyPress
public event KeyPress: System.Windows.Forms.KeyPressEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
[C1Description("当当组件具有焦点时,按下一个按键时触发。")]
[C1Category("键盘")]
public: __event System.Windows.Forms.KeyPressEventHandler* KeyPress
[C1Description("当当组件具有焦点时,按下一个按键时触发。")]
[C1Category("键盘")]
public:
event System.Windows.Forms.KeyPressEventHandler^ KeyPress
事件数据

The event handler receives an argument of type System.Windows.Forms.KeyPressEventArgs containing data related to this event. The following KeyPressEventArgs properties provide information specific to this event.

属性说明
Handled  
KeyChar  
需求

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

请参见

引用

InputComponent 类
InputComponent 成员

Send Feedback