Control.IsInputChar(Char) Control.IsInputChar(Char) Control.IsInputChar(Char) Control.IsInputChar(Char) Method

定义

确定一个字符是否是控件可识别的输入字符。Determines if a character is an input character that the control recognizes.

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

参数

charCode
Char Char Char Char

要测试的字符。The character to test.

返回

如果字符应直接发送到控件且不必经过预处理,则为 true;否则为 falsetrue if the character should be sent directly to the control and not preprocessed; otherwise, false.

注解

调用方法以确定charCode参数指定的字符是否是控件所需的输入字符。 IsInputCharCall the IsInputChar method to determine whether the character specified by the charCode parameter is an input character that the control wants. 此方法在窗口消息预处理过程中调用,以确定应将指定的输入字符预处理还是直接发送到控件。This method is called during window message preprocessing to determine whether the specified input character should be preprocessed or sent directly to the control. 如果IsInputChar 返回true,则将指定的字符直接发送到控件。If IsInputChar returns true, the specified character is sent directly to the control. 如果IsInputChar 返回false,则将对指定字符进行预处理,并且仅在预处理阶段不使用它时将其发送到控件。If IsInputChar returns false, the specified character is preprocessed and only sent to the control if it is not consumed by the preprocessing phase. 字符的预处理包括检查字符是否为另一个控件的助记键。The preprocessing of a character includes checking whether the character is a mnemonic of another control.

安全性

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

适用于

另请参阅