NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

InputLanguage.GetHandle

Returns the handle for the input language.

[Visual Basic]
Overridable Public Function GetHandle() As Integer
[C#]
public virtual int GetHandle();
[C++]
public: virtual int GetHandle();
[JScript]
public function GetHandle() : int;

Return Value

A value that represents the handle of this input language.

Example [C#]

The following example gets the current input language. Then it calls GetHandle to get the handle. It prints the results in a text box. It assumes that TextBox1 and Button1 have been instantiated.

[C#]

public void MyHandle() {
   //Get the current input language.
   InputLanguage myCurrentLanguage = InputLanguage.GetCurrentInputLanguage();

   //Get a handle for the language and print the number.
   int myHandle = myCurrentLanguage.GetHandle();
   textBox1.Text = "The handle number is: " + myHandle.ToString();
}

See Also

InputLanguage Class | InputLanguage Members | System.WinForms Namespace | GetCurrentInputLanguage