问题描述
我使用了这段代码MessageBox.Show(System.Windows.Forms.InputLanguage.CurrentInputLanguage.LayoutName);
用于获取CurrentInputLanguage.但是当焦点不在我的程序窗口上时,它不返回任何内容或返回用户在我的程序上使用过的最后一个语言.我想获取所有正在运行的程序的CurrentInputLanguage,而不仅仅是我的程序.获取显示在任务栏右侧的语言.
您能给我一些代码吗?
Hi,I used this code MessageBox.Show(System.Windows.Forms.InputLanguage.CurrentInputLanguage.LayoutName);
For getting CurrentInputLanguage.But When Focus is not on Window of my program,Its Return Nothing Or Return Last Language That user have Worked with it on my program.I want to Get CurrentInputLanguage For All Programs running,not only for my program.I want to get language which is shown in rightside of taskbar.
Can you give me some code Please?
推荐答案
string myLang = System.Windows.Input.InputLanguageManager.Current.DisplayName;
这篇关于如何获取另一个程序的CurrentInputLanguage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!