SplitContainer.ProcessDialogKey(Keys) SplitContainer.ProcessDialogKey(Keys) SplitContainer.ProcessDialogKey(Keys) SplitContainer.ProcessDialogKey(Keys) Method

定义

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

protected:
 override bool ProcessDialogKey(System::Windows::Forms::Keys keyData);
protected override bool ProcessDialogKey (System.Windows.Forms.Keys keyData);
override this.ProcessDialogKey : System.Windows.Forms.Keys -> bool
Protected Overrides 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 control; otherwise, false.

注解

在消息预处理过程中,将调用此方法来处理对话框键字符,如选项卡、向左键、向右键、向上键和向下键。This method is called during message preprocessing to handle dialog box key characters, such as TAB, LEFT ARROW, RIGHT ARROW, UP ARROW, and DOWN ARROW. 不处理包含 ALT 或控件修饰符的键。Keys that include the ALT or CONTROL modifiers are not handled. 仅当Control.IsInputKey方法指示控件未处理该键时,才调用此方法。This method is called only if the Control.IsInputKey method indicates that the control is not processing the key. Control.ProcessDialogKey是将字符发送到父级的Control.ProcessDialogKey方法,如果控件没有false父级,则返回。The Control.ProcessDialogKey simply sends the character to the parent's Control.ProcessDialogKey method, or returns false if the control has no parent. System.Windows.Forms.Form类将重写此方法以执行对话框键的实际处理。The System.Windows.Forms.Form class overrides this method to perform actual processing of dialog box keys. 仅当控件承载于 Windows 窗体应用程序或 ActiveX 控件中时,运行时才会调用此方法。The run time calls this method only when the control is hosted in a Windows Forms application or as an ActiveX control.

继承者说明

当在派生ProcessDialogKey(Keys)类中重写方法时, 控件应返回true以指示它已处理该键。When overriding the ProcessDialogKey(Keys) method in a derived class, a control should return true to indicate that it has processed the key. 对于不是由控件处理的键, 应返回调用基类的ProcessDialogChar(Char)方法的结果。For keys that are not processed by the control, the result of calling the base class's ProcessDialogChar(Char) method should be returned. 控件很少需要重写此方法 (如果需要)。Controls will seldom, if ever, need to override this method.

安全性

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

适用于

另请参阅