ToolStrip.ProcessMnemonic(Char) 方法

定義

處理助憶鍵字元。Processes a mnemonic character.

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

參數

charCode
Char

要處理的字元。The character to process.

傳回

Boolean

如果控制項已將字元當成助憶鍵處理,則為 true,否則為 falsetrue if the character was processed as a mnemonic by the control; otherwise, false.

備註

ProcessMnemonic呼叫方法,讓控制項有機會處理助憶鍵字元。The ProcessMnemonic method is called to give a control the opportunity to process a mnemonic character. 這個方法應該決定控制項是否處於處理助憶鍵的狀態,以及指定的字元是否代表助憶鍵。This method should determine whether the control is in a state to process mnemonics and whether the given character represents a mnemonic. 如果是的話,方法應該執行與助憶鍵相關聯的動作並傳回 trueIf so, the method should perform the action associated with the mnemonic and return true. 如果沒有,則方法應傳回 falseIf not, the method should return false.

此方法的實,通常會使用 Control.IsMnemonic 方法來判斷指定的字元是否符合控制項文字中的助憶鍵。Implementations of this method often use the Control.IsMnemonic method to determine whether the given character matches a mnemonic in the control's text.

這種方法的預設執行只會傳回 ProcessMnemonic false ,表示該控制項沒有助憶鍵。This default implementation of the ProcessMnemonic method simply returns false, to indicate that the control has no mnemonic.

適用於