ToolStrip.ProcessMnemonic(Char) ToolStrip.ProcessMnemonic(Char) ToolStrip.ProcessMnemonic(Char) ToolStrip.ProcessMnemonic(Char) Method

定義

處理助憶鍵字元。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 Char Char Char

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

傳回

如果控制項已將字元當成助憶鍵處理,則為 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.

適用於