Form.ProcessDialogKey(Keys) 方法

定义

处理对话框键。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 值之一,表示要处理的键。One of the Keys values that represents the key to process.

返回

如果控件处理并使用击键,则为 true;否则为 false,以允许进一步处理。true if the keystroke was processed and consumed by the control; otherwise, false to allow further processing.

注解

ProcessDialogKey 方法将重写基 ContainerControl.ProcessDialogKey 实现,以在对话框中提供对回车和转义键的额外处理。The ProcessDialogKey method overrides the base ContainerControl.ProcessDialogKey implementation to provide additional handling of the RETURN and ESCAPE keys in dialog boxes. 方法不对包含 ALT 或控件修饰符的击键执行任何处理。The method performs no processing on keystrokes that include the ALT or CONTROL modifiers.

适用于

另请参阅