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


現在の入力言語の InputLanguage を取得するコード例を次に示します。この入力言語と入力言語の名前がテキスト ボックスに表示されます。
このコードは、textBox1 が既にインスタンス化されていることを前提にしています。
Public Sub MyCulture() ' Gets the current input language. Dim myCurrentLanguage As InputLanguage = InputLanguage.CurrentInputLanguage ' Gets the culture for the language and prints it. Dim myCultureInfo As CultureInfo = myCurrentLanguage.Culture textBox1.Text = myCultureInfo.EnglishName End Sub
public void MyCulture() { // Gets the current input language. InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage; // Gets the culture for the language and prints it. CultureInfo myCultureInfo = myCurrentLanguage.Culture; textBox1.Text = myCultureInfo.EnglishName; }
public: void MyCulture() { // Gets the current input language. InputLanguage^ myCurrentLanguage = InputLanguage::CurrentInputLanguage; // Gets the culture for the language and prints it. CultureInfo^ myCultureInfo = myCurrentLanguage->Culture; textBox1->Text = myCultureInfo->EnglishName; }
public void MyCulture() { // Gets the current input language. InputLanguage myCurrentLanguage = InputLanguage.get_CurrentInputLanguage(); // Gets the culture for the language and prints it. CultureInfo myCultureInfo = myCurrentLanguage.get_Culture(); textBox1.set_Text(myCultureInfo.get_EnglishName()); } //MyCulture

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.Culture プロパティを検索する場合は、下記のリンクをクリックしてください。

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