InputLanguage.DefaultInputLanguage 属性

定义

获取系统的默认输入语言。

public:
 static property System::Windows::Forms::InputLanguage ^ DefaultInputLanguage { System::Windows::Forms::InputLanguage ^ get(); };
public static System.Windows.Forms.InputLanguage DefaultInputLanguage { get; }
member this.DefaultInputLanguage : System.Windows.Forms.InputLanguage
Public Shared ReadOnly Property DefaultInputLanguage As InputLanguage

属性值

InputLanguage

InputLanguage,表示系统的默认输入语言。

示例

下面的代码示例获取默认输入语言,并在文本框中打印其名称。 此代码假定 textBox1 已实例化。

public:
   void MyDefaultInputLanguage()
   {
      // Gets the default input language  and prints it in a text box.
      InputLanguage^ myDefaultLanguage = InputLanguage::DefaultInputLanguage;
      textBox1->Text = String::Format( "Default input language is: {0}",
         myDefaultLanguage->Culture->EnglishName );
   }
public void MyDefaultInputLanguage() {
   // Gets the default input language  and prints it in a text box.
   InputLanguage myDefaultLanguage = InputLanguage.DefaultInputLanguage;
   textBox1.Text = "Default input language is: " + myDefaultLanguage.Culture.EnglishName;
}
Public Sub MyDefaultInputLanguage()
   ' Gets the default input language  and prints it in a text box.
   Dim myDefaultLanguage As InputLanguage = InputLanguage.DefaultInputLanguage
   textBox1.Text = "Default input language is: " & _
       myDefaultLanguage.Culture.EnglishName
End Sub

适用于

另请参阅