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