input-language

Hook/detect windows language change even when app not focused

99封情书 提交于 2019-12-18 04:09:27
问题 Is there a way to detect if the windows/os language changed even when my app is not in focus? So far I was able to achieve what I wanted only if the app was focused using: string language = ""; System.Windows.Input.InputLanguageManager.Current.InputLanguageChanged += new System.Windows.Input.InputLanguageEventHandler((sender, e) => { language = e.NewLanguage.DisplayName; MessageBox.Show(language); }); But as you can understand, this is not exactly what I want.. I was thinking about other

Hook/detect windows language change even when app not focused

僤鯓⒐⒋嵵緔 提交于 2019-11-29 04:13:16
Is there a way to detect if the windows/os language changed even when my app is not in focus? So far I was able to achieve what I wanted only if the app was focused using: string language = ""; System.Windows.Input.InputLanguageManager.Current.InputLanguageChanged += new System.Windows.Input.InputLanguageEventHandler((sender, e) => { language = e.NewLanguage.DisplayName; MessageBox.Show(language); }); But as you can understand, this is not exactly what I want.. I was thinking about other solution such as hooking the keys that change the language (for example alt+shift) but I wont be able to