InputLanguage.LayoutName プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


現在の入力言語に関連付けられているカルチャを取得し、カルチャ名を表示するコード例を次に示します。
まず、現在の入力言語を取得するために CurrentInputLanguage を呼び出します。次に、取得した入力言語のカルチャ情報を取得するために Culture を呼び出します。最後に、EnglishName を取得してテキスト ボックスに表示します。
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 Else 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; else textBox1.Text = "There is no current language"; }
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.get_CurrentInputLanguage(); if (myCurrentLanguage != null) { textBox1.set_Text("Layout: " + myCurrentLanguage.get_LayoutName()); } else { textBox1.set_Text("There is no current language"); } } //MyLayoutName

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からInputLanguage.LayoutName プロパティを検索する場合は、下記のリンクをクリックしてください。

- InputLanguage.LayoutName プロパティのページへのリンク