Control.IsMnemonic メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Control.IsMnemonic メソッドの意味・解説 

Control.IsMnemonic メソッド

指定した文字が、指定した文字列内のコントロール割り当てられニーモニック文字かどうか確認します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Shared Function IsMnemonic
 ( _
    charCode As Char, _
    text As String _
) As Boolean
Dim charCode As Char
Dim text As String
Dim returnValue As Boolean

returnValue = Control.IsMnemonic(charCode, text)
public static bool IsMnemonic
 (
    char charCode,
    string text
)
public:
static bool IsMnemonic (
    wchar_t charCode, 
    String^ text
)
public static boolean IsMnemonic (
    char charCode, 
    String text
)
public static function IsMnemonic
 (
    charCode : char, 
    text : String
) : boolean

パラメータ

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;
   }

};


.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Control.IsMnemonic メソッド」の関連用語

Control.IsMnemonic メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Control.IsMnemonic メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS