碼如下(放到Form_Load中就可以了):
if(InputLanguage.DefaultInputLanguage.LayoutName.IndexOf("Keyboard")==-1 && InputLanguage.DefaultInputLanguage.Culture.Name.Equals("zh-CN"))
{
InputLanguage.CurrentInputLanguage=InputLanguage.DefaultInputLanguage;
}
else
{
foreach(InputLanguage lang in InputLanguage.InstalledInputLanguages)
{
if(lang.Culture.Name.Equals("zh-CN") && lang.LayoutName.IndexOf("Keyboard")==-1)
{
InputLanguage.CurrentInputLanguage=lang;
break;
}
}
}