开发者

System.Windows.Forms.InputLanguage.CurrentInputLanguage always give me English

开发者 https://www.devze.com 2023-03-09 19:51 出处:网络
i\'m writing a Key Logger application, and i want it to detect the current inpu开发者_开发百科t language,

i'm writing a Key Logger application, and i want it to detect the current inpu开发者_开发百科t language,

i've 2 installed English - US, and Arabic (101)

this line should give me the current input language, but it always gives me English

System.Windows.Forms.InputLanguage.CurrentInputLanguage.LayoutName??

is there is another solution ?


InputLanguage.CurrentInputLanguage returns the current language for the current thread, in this case for your keylogger application.

You can P/Invoke GetKeyboardLayout (http://msdn.microsoft.com/en-us/library/ms646296) if you want to retrieve the layout for other threads.

0

精彩评论

暂无评论...
验证码 换一张
取 消