InputLanguage.CurrentInputLanguage Właściwość

Definicja

Pobiera lub ustawia język wejściowy dla bieżącego wątku.

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

Wartość właściwości

InputLanguage

Element InputLanguage reprezentujący język wejściowy bieżącego wątku.

Wyjątki

Język wejściowy nie jest rozpoznawany przez system.

Przykłady

Poniższy przykład kodu pobiera i wyświetla nazwę bieżącego języka wejściowego. W tym kodzie przyjęto założenie, że textBox1 zostało utworzone wystąpienie.

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

Dotyczy

Zobacz też