Application.CurrentInputLanguage 属性

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

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public Shared Property CurrentInputLanguage As InputLanguage
用法
Dim value As InputLanguage

value = Application.CurrentInputLanguage

Application.CurrentInputLanguage = value
public static InputLanguage CurrentInputLanguage { get; set; }
public:
static property InputLanguage^ CurrentInputLanguage {
    InputLanguage^ get ();
    void set (InputLanguage^ value);
}
/** @property */
public static InputLanguage get_CurrentInputLanguage ()

/** @property */
public static void set_CurrentInputLanguage (InputLanguage value)
public static function get CurrentInputLanguage () : InputLanguage

public static function set CurrentInputLanguage (value : InputLanguage)

属性值

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

示例

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

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

.NET Framework 安全性

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

Application 类
Application 成员
System.Windows.Forms 命名空间
CultureInfo
InputLanguage