Application.CurrentInputLanguage 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置当前线程的当前输入语言。
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,它代表当前线程的当前输入语言。
示例
下面的代码示例获取此属性,并在文本框中显示其值。 该示例要求 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