Export (0) Print
Expand All

InputLanguage.LayoutName Property

Gets the name of the current keyboard layout as it appears in the regional settings of the operating system on the computer.

[Visual Basic]
Public ReadOnly Property LayoutName As String
public string LayoutName {get;}
public: __property String* get_LayoutName();
public function get LayoutName() : String;

Property Value

The name of the layout.


[Visual Basic, C#, C++] The following example gets the culture associated with the current input language and displays the culture name.

[Visual Basic, C#, C++] First, CurrentInputLanguage is called to get the current input language. Then, Culture is called to get the culture information for this input language. Finally, EnglishName is retrieved and displayed in a text box.

[Visual Basic] 
Public Sub MyLayoutName()
   ' Gets the current input language.
   Dim myCurrentLanguage As InputLanguage = InputLanguage.CurrentInputLanguage
   If Not (myCurrentLanguage Is Nothing) Then
      textBox1.Text = "Layout: " & myCurrentLanguage.LayoutName
      textBox1.Text = "There is no current language"
   End If
End Sub

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

   if(myCurrentLanguage != null) 
      textBox1.Text = "Layout: " + myCurrentLanguage.LayoutName;
      textBox1.Text = "There is no current language";

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

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

InputLanguage Class | InputLanguage Members | System.Windows.Forms Namespace | CurrentInputLanguage

© 2014 Microsoft