InputLanguage.LayoutName Propriedade

Definição

Recebe o nome do layout atual do teclado tal como aparece nas definições regionais do sistema operativo no computador.

public:
 property System::String ^ LayoutName { System::String ^ get(); };
public string LayoutName { get; }
member this.LayoutName : string
Public ReadOnly Property LayoutName As String

Valor de Propriedade

O nome do layout.

Exemplos

O exemplo de código seguinte obtém a cultura associada à língua de entrada atual e apresenta o nome da cultura.

Primeiro, CurrentInputLanguage é chamado para obter a linguagem de entrada atual. Depois, Culture é chamado para obter a informação cultural para esta linguagem de entrada. Finalmente, EnglishName é recuperado e apresentado numa caixa de texto.

public:
   void MyLayoutName()
   {
      // Gets the current input language.
      InputLanguage^ myCurrentLanguage = InputLanguage::CurrentInputLanguage;

      if ( myCurrentLanguage != nullptr )
      {
         textBox1->Text = String::Format( "Layout: {0}", myCurrentLanguage->LayoutName );
      }
      else
      {
         textBox1->Text = "There is no current language";
      }
   }
public void MyLayoutName() {
   // Gets the current input language.
   InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage;

   if(myCurrentLanguage != null) 
      textBox1.Text = "Layout: " + myCurrentLanguage.LayoutName;
   else
      textBox1.Text = "There is no current language";
}
Public Sub MyLayoutName()
   ' Gets the current input language.
   Dim myCurrentLanguage As InputLanguage = InputLanguage.CurrentInputLanguage
       
   If (myCurrentLanguage IsNot Nothing) Then
      textBox1.Text = "Layout: " & myCurrentLanguage.LayoutName
   Else
      textBox1.Text = "There is no current language"
   End If
End Sub

Aplica-se a

Ver também