Application.CurrentInputLanguage 属性

定义

获取或设置当前线程的当前输入语言。

public:
 static property System::Windows::Forms::InputLanguage ^ CurrentInputLanguage { System::Windows::Forms::InputLanguage ^ get(); void set(System::Windows::Forms::InputLanguage ^ value); };
public static System.Windows.Forms.InputLanguage CurrentInputLanguage { get; set; }
member this.CurrentInputLanguage : System.Windows.Forms.InputLanguage with get, set
Public Shared Property CurrentInputLanguage As InputLanguage

属性值

InputLanguage

一个 InputLanguage,它代表当前线程的当前输入语言。

示例

下面的代码示例获取此属性,并在文本框中显示其值。 该示例要求 textBox1 已放置在窗体上。

private:
   void PrintCurrentInputLanguage()
   {
      textBox1->Text = "The current input language is: {0}",
         Application::CurrentInputLanguage->Culture->EnglishName;
   }
private void PrintCurrentInputLanguage() {
    textBox1.Text = "The current input language is: " +
       Application.CurrentInputLanguage.Culture.EnglishName;
 }
Private Sub PrintCurrentInputLanguage()
   textBox1.Text = "The current input language is: " & _
      Application.CurrentInputLanguage.Culture.EnglishName
End Sub

适用于

另请参阅