InputLanguage.DefaultInputLanguage 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得系統的預設輸入語言。
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