InputLanguage.Handle プロパティ

定義

入力言語のハンドルを取得します。

public:
 property IntPtr Handle { IntPtr get(); };
public IntPtr Handle { get; }
member this.Handle : nativeint
Public ReadOnly Property Handle As IntPtr

プロパティ値

IntPtr

nativeint

入力言語のハンドルを表す IntPtr

次のコード例では、現在の入力言語を取得します。 次に、ハンドルの取得を呼び出 Handle し、結果をテキスト ボックスに出力します。 この例では、インスタンス textBox1 化されている必要があります。

public:
   void MyHandle()
   {
      // Gets the current input language.
      InputLanguage^ myCurrentLanguage = InputLanguage::CurrentInputLanguage;
      
      // Gets a handle for the language and prints the number.
      IntPtr myHandle = myCurrentLanguage->Handle;
      textBox1->Text = String::Format( "The handle number is: {0}", myHandle );
   }
public void MyHandle() {
   // Gets the current input language.
   InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage;

   // Gets a handle for the language  and prints the number.
   IntPtr myHandle = myCurrentLanguage.Handle;
   textBox1.Text = "The handle number is: " + myHandle.ToString();
}
Public Sub MyHandle()
   ' Gets the current input language.
   Dim myCurrentLanguage As InputLanguage = InputLanguage.CurrentInputLanguage
       
   ' Gets a handle for the language  and prints the number.
   Dim myHandle As IntPtr = myCurrentLanguage.Handle
   textBox1.Text = "The handle number is: " & myHandle.ToString()
End Sub

適用対象

こちらもご覧ください