共用方式為


InputLanguage.DefaultInputLanguage 屬性

定義

取得系統的預設輸入語言。

public:
 static property System::Windows::Forms::InputLanguage ^ DefaultInputLanguage { System::Windows::Forms::InputLanguage ^ get(); };
public static System.Windows.Forms.InputLanguage DefaultInputLanguage { get; }
static member DefaultInputLanguage : System.Windows.Forms.InputLanguage
Public Shared ReadOnly Property DefaultInputLanguage As 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

適用於

另請參閱