ToolStripItem.ProcessMnemonic(Char) ToolStripItem.ProcessMnemonic(Char) ToolStripItem.ProcessMnemonic(Char) ToolStripItem.ProcessMnemonic(Char) Method

定义

处理助记键字符。Processes a mnemonic character.

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

参数

charCode
Char Char Char Char

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

返回

在所有情况下均为 truetrue in all cases.

注解

调用此方法可使项有机会处理助记键字符。This method is called to give an item the opportunity to process a mnemonic character. 方法应确定项是否处于用于处理助记键的状态, 以及给定字符是否表示助记键。The method should determine whether the item is in a state to process mnemonics and if whether the given character represents a mnemonic. 如果是这样, 则该方法应执行与助记键关联的操作true, 并返回。If so, the method should perform the action associated with the mnemonic and return true. 如果不是, 则该方法false应返回。If not, the method should return false.

此基类实现依赖于宿主ToolStrip控件来IsMnemonic调用方法, 以确定给定字符是否与项文本中的助记键匹配。This base-class implementation relies on the host ToolStrip control to call the IsMnemonic method to determine whether the given character matches a mnemonic in the item's text. 在这种情况下, 方法将Click引发事件, true并返回。In this case, the method raises the Click event and returns true.

安全性

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

适用于