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方法,如果控件没有父级,则返回。 false ProcessDialogCharThe 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 UIPermissionWindow枚举: 值。Associated enumeration: AllWindows value of UIPermissionWindow.

适用于