NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Control.ProcessMnemonic

Processes a mnemonic character. This method is called to give a control the opportunity to process a mnemonic character. The method should check if the control is in a state to process mnemonics and if the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return true. If not, the method should return false. Implementations of this method often use the isMnemonic() method to check if the given character matches a mnemonic in the control's text, for example:

if (canSelect() && isMnemonic(charCode, getText()) {
    // perform action associated with mnemonic
    }

This default implementation of processMnemonic() simply returns false to indicate that the control has no mnemonic.

[Visual Basic]
Overridable Protected Function ProcessMnemonic( _
   ByVal charCode As Char _
) As Boolean
[C#]
protected virtual bool ProcessMnemonic(
   char charCode
);
[C++]
protected: virtual bool ProcessMnemonic(
   __wchar_t charCode
);
[JScript]
protected function ProcessMnemonic(
   charCode : Char
) : Boolean;

Parameters

charCode
character to test.

Return Value

true if mnemonic was processed, false if not.

See Also

Control Class | Control Members | System.WinForms Namespace | IsMnemonic | ProcessDialogChar