入力言語のハンドルを取得します。
Public ReadOnly Property Handle As IntPtr
[C#]
public IntPtr Handle {get;}
[C++]
public: __property IntPtr get_Handle();
[JScript]
public function get Handle() : IntPtr;
プロパティ値
入力言語のハンドルを表す IntPtr 。
使用例
[Visual Basic, C#, C++] 現在の入力言語を取得する例を次に示します。続いて、 Handle を呼び出してハンドルを取得し、その結果をテキスト ボックスに出力します。この例は、 textBox1
がインスタンス化されていることを前提にしています。
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
[C#]
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();
}
[C++]
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( S"The handle number is: {0}", __box(myHandle));
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
InputLanguage クラス | InputLanguage メンバ | System.Windows.Forms 名前空間 | CurrentInputLanguage