Control.IsInputChar(Char) 方法

定义

确定一个字符是否是控件可识别的输入字符。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

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

返回

Boolean

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

注解

调用 IsInputChar 方法,以确定 charCode 参数指定的字符是否是控件所需的输入字符。Call 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.

适用于

另请参阅