InputLanguage.LayoutName Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene il nome del layout di tastiera corrente visualizzato nelle impostazioni internazionali del sistema operativo nel computer.
public:
property System::String ^ LayoutName { System::String ^ get(); };
public string LayoutName { get; }
member this.LayoutName : string
Public ReadOnly Property LayoutName As String
Valore della proprietà
Nome del layout.
Esempio
L'esempio di codice seguente ottiene le impostazioni cultura associate alla lingua di input corrente e visualizza il nome delle impostazioni cultura.
In primo luogo, CurrentInputLanguage viene chiamato per ottenere la lingua di input corrente. Culture Viene quindi chiamato per ottenere le informazioni sulle impostazioni cultura per questa lingua di input. Infine, EnglishName viene recuperato e visualizzato in una casella di testo.
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