I'm writing an application which I require to change system's language when the application itself is NOT FOCUSED. I'm afraid that the only way to do it is by using windows hook which I can't fully understand at the moment. any thoughts?
EDIT: Solution
[DllImport("user32.dll")]
private static extern bool PostMessage(int hhwnd, uint msg, IntPtr wparam, IntPtr lparam);
[DllImport("user32.dll")]
private static extern IntPtr LoadKeyboardLayout(string pwszKLID, uint Flags);
private static uint WM_INPUTLANGCHANGEREQUEST = 0x0050;
private static int HWND_BROADCAST = 0xffff;
private static string en_US = "00000409";
private static uint KLF_ACTIVATE = 1;
private static void ChangeLanguage()
{
PostMessage(HWND_BROADCAST,WM_INPUTLANGCHANGEREQUEST, IntPtr.Zero ,LoadKeyboardLayout(en_US,KLF_ACTIVATE));
}