ToolStripItem.ProcessDialogKey(Keys) ToolStripItem.ProcessDialogKey(Keys) ToolStripItem.ProcessDialogKey(Keys) ToolStripItem.ProcessDialogKey(Keys) Method

定义

处理对话框键。Processes a dialog key.

protected public:
 virtual bool ProcessDialogKey(System::Windows::Forms::Keys keyData);
protected internal virtual bool ProcessDialogKey (System.Windows.Forms.Keys keyData);
abstract member ProcessDialogKey : System.Windows.Forms.Keys -> bool
override this.ProcessDialogKey : System.Windows.Forms.Keys -> bool
Protected Friend Overridable Function ProcessDialogKey (keyData As Keys) As Boolean

参数

keyData
Keys Keys Keys Keys

Keys 值之一,表示要处理的键。One of the Keys values that represents the key to process.

返回

如果键已由该项处理,则为 true;否则为 falsetrue if the key was processed by the item; otherwise, false.

注解

在消息预处理过程中, 将调用此方法来处理 ENTER 键和空格键, 以便引发Click事件。This method is called during message preprocessing to handle the ENTER and SPACEBAR keys in order to raise the Click event. 仅当IsInputKey方法指示该项未处理该键时, 才调用此方法。This method is called only if the IsInputKey method indicates that the item is not processing the key.

继承者说明

当在派生ProcessDialogKey(Keys)类中重写方法时, 重写实现应true返回以指示它已处理该键。When overriding the ProcessDialogKey(Keys) method in a derived class, the overriding implementation should return true to indicate that it has processed the key. 派生类很少需要重写此方法 (如果需要)。Derived classes will seldom, if ever, need to override this method.

安全性

UIPermission
用于继承类的所有窗口以调用此方法。for all windows for inheriting classes to call this method. 关联的AllWindows UIPermissionWindow枚举: 值。Associated enumeration: AllWindows value of UIPermissionWindow.

适用于