Control.ProcessDialogChar(Char) Control.ProcessDialogChar(Char) Control.ProcessDialogChar(Char) Control.ProcessDialogChar(Char) Method

定义

处理对话框字符。Processes a dialog character.

protected:
 virtual bool ProcessDialogChar(char charCode);
protected virtual bool ProcessDialogChar (char charCode);
abstract member ProcessDialogChar : char -> bool
override this.ProcessDialogChar : char -> bool
Protected Overridable Function ProcessDialogChar (charCode As Char) As Boolean

参数

charCode
Char Char Char Char

要处理的字符。The character to process.

返回

如果字符已由控件处理,则为 true;否则为 falsetrue if the character was processed by the control; otherwise, false.

注解

邮件预处理以处理对话框字符,如控件的助记键时调用此方法。This method is called during message preprocessing to handle dialog characters, such as control mnemonics. 仅当调用此方法IsInputChar方法指示该控件不处理该字符。This method is called only if the IsInputChar method indicates that the control is not processing the character. ProcessDialogChar方法只需将该字符发送到的父ProcessDialogChar方法或返回false如果控件具有没有父级。The ProcessDialogChar method simply sends the character to the parent's ProcessDialogChar method, or returns false if the control has no parent. Form类重写此方法以执行实际处理对话框字符。The Form class overrides this method to perform actual processing of dialog characters. 当控件承载在 Windows 窗体应用程序或作为 ActiveX 控件时,只能调用此方法。This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control.

继承者说明

重写时ProcessDialogChar(Char)派生类中的方法,控件应返回true以指示它已处理的字符。When overriding the ProcessDialogChar(Char) method in a derived class, a control should return true to indicate that it has processed the character. 不会处理由控件调用的基类的结果的字符ProcessDialogChar(Char)方法应返回。For characters 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. 关联枚举:AllWindows的值UIPermissionWindowAssociated enumeration: AllWindows value of UIPermissionWindow.

适用于