InputLanguage.DefaultInputLanguage 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取系统的默认输入语言。
public:
static property System::Windows::Forms::InputLanguage ^ DefaultInputLanguage { System::Windows::Forms::InputLanguage ^ get(); };
public static System.Windows.Forms.InputLanguage DefaultInputLanguage { get; }
member this.DefaultInputLanguage : System.Windows.Forms.InputLanguage
Public Shared ReadOnly Property DefaultInputLanguage As InputLanguage
属性值
InputLanguage,表示系统的默认输入语言。
示例
下面的代码示例获取默认输入语言,并在文本框中打印其名称。 此代码假定 textBox1
已实例化。
public:
void MyDefaultInputLanguage()
{
// Gets the default input language and prints it in a text box.
InputLanguage^ myDefaultLanguage = InputLanguage::DefaultInputLanguage;
textBox1->Text = String::Format( "Default input language is: {0}",
myDefaultLanguage->Culture->EnglishName );
}
public void MyDefaultInputLanguage() {
// Gets the default input language and prints it in a text box.
InputLanguage myDefaultLanguage = InputLanguage.DefaultInputLanguage;
textBox1.Text = "Default input language is: " + myDefaultLanguage.Culture.EnglishName;
}
Public Sub MyDefaultInputLanguage()
' Gets the default input language and prints it in a text box.
Dim myDefaultLanguage As InputLanguage = InputLanguage.DefaultInputLanguage
textBox1.Text = "Default input language is: " & _
myDefaultLanguage.Culture.EnglishName
End Sub