InputLanguage.Handle 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得輸入語言的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