InputLanguage.Handle 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取输入语言的句柄。
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