public static inputlanguage getdesiredinputlanguage(string layoutname) {
inputlanguagecollection ilc = inputlanguage.installedinputlanguages;
foreach (inputlanguage il in ilc) {
if (il.layoutname.indexof(layoutname) != -1)
return il;
}
return null;
}
private void button1_click(object sender, system.eventargs e) {
inputlanguage il = getdesiredinputlanguage("智能陈桥输入平台 5.6");
if (il == null) {
inputlanguage.currentinputlanguage = inputlanguage.defaultinputlanguage;
messagebox.show("未能找到");
}
textbox1.focus();
inputlanguage.currentinputlanguage = il;
}
新闻热点
疑难解答