InputLanguage.CurrentInputLanguage Property


Gets or sets the input language for the current thread.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static InputLanguage CurrentInputLanguage { get; set; }

Property Value

Type: System.Windows.Forms.InputLanguage

An InputLanguage that represents the input language for the current thread.

Exception Condition

The input language is not recognized by the system.

The following code example gets and displays the name of the current input language. This code assumes that textBox1 has been instantiated.

public void MyCurrentInputLanguage() {
   // Gets the current input language  and prints it in a text box.
   InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage;
   textBox1.Text = "Current input language is: " +


for access to unmanaged code. Associated enumeration: UnmanagedCode

.NET Framework
Available since 1.1
Return to top