Control.IsMnemonic メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim charCode As Char Dim text As String Dim returnValue As Boolean returnValue = Control.IsMnemonic(charCode, text)
戻り値
charCode 文字が、コントロールに割り当てられたニーモニック文字である場合は true。それ以外の場合は false。


ProcessMnemonic メソッドをオーバーライドするボタン クラスを拡張し、カスタム動作を示す方法を次のコード例に示します。また、この例では、CanSelect プロパティと IsMnemonic プロパティも使用しています。この例を実行するには、次のコードを、同じファイル内のフォーム クラスの後に貼り付けます。そして、MnemonicButton 型のボタンをフォームに追加します。
// This button is a simple extension of the button class that overrides // the ProcessMnemonic method. If the mnemonic is correctly entered, // the message box will appear and the click event will be raised. // This method makes sure the control is selectable and the // mnemonic is correct before displaying the message box // and triggering the click event. public ref class MyMnemonicButton: public Button { protected: bool ProcessMnemonic( char inputChar ) { if ( CanSelect && IsMnemonic( inputChar, this->Text ) ) { MessageBox::Show( "You've raised the click event " "using the mnemonic." ); this->PerformClick(); return true; } return false; } };


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からControl.IsMnemonic メソッドを検索する場合は、下記のリンクをクリックしてください。

- Control.IsMnemonic メソッドのページへのリンク