InputLanguage.InstalledInputLanguages Właściwość

Definicja

Pobiera listę wszystkich zainstalowanych języków wejściowych.

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

Wartość właściwości

Tablica InputLanguage obiektów reprezentujących języki wejściowe zainstalowane na komputerze.

Przykłady

Poniższy przykład kodu pobiera wszystkie języki wejściowe zainstalowane na komputerze i wyświetla ich nazwy. Wywołania InstalledInputLanguages kodu w celu pobrania zainstalowanych języków. W polu tekstowym jest wyświetlana lista nazw języków.

W tym kodzie przyjęto założenie, że textBox1 utworzono wystąpienie i textBox1.MultiLine ustawiono wartość true.

public:
   void GetLanguages()
   {
      // Gets the list of installed languages.
      for each ( InputLanguage^ lang in InputLanguage::InstalledInputLanguages )
      {
         textBox1->Text = String::Concat( textBox1->Text, lang->Culture->EnglishName, "\n" );
      }
   }
public void GetLanguages() {
   // Gets the list of installed languages.
   foreach(InputLanguage lang in InputLanguage.InstalledInputLanguages) {
      textBox1.Text += lang.Culture.EnglishName + '\n';
   }
}
Public Sub GetLanguages()
   ' Gets the list of installed languages.
   Dim lang As InputLanguage
   For Each lang In  InputLanguage.InstalledInputLanguages
      textBox1.Text &= lang.Culture.EnglishName & ControlChars.Cr
   Next lang
End Sub

Dotyczy

Zobacz też