简体   繁体   English

更改键盘C#的输入类型

[英]Change input type of the keyboard C#

I am looking for a way to change the input type of the keyboard in a WinForm application for a WindowsCE Device. 我正在寻找一种在WindowsCE设备的WinForm应用程序中更改键盘输入类型的方法。 We are using scanners with WindowsCE installed on them. 我们正在使用安装了WindowsCE的扫描仪。 By default, the input type can be changed by pressing the F8(Alpha) key on the scanner. 默认情况下,可以通过按扫描仪上的F8(Alpha)键来更改输入类型。 Is there any way that this can be done in a C# code? 有什么办法可以用C#代码完成吗?

Call this codes in a proper place 将此代码放在适当的位置

System.Globalization.CultureInfo lang = new System.Globalization.CultureInfo('language-culture');
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(lang);

and set your language-culture . 并设置您的语言文化 example "fa-IR" for farsi. 例如“ fa-IR”代表波斯语。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM