public static void SwitchLayout(IntPtr hWnd, Language layout) //Смена раскладки
        {
            switch (layout)
            {
            case Language.ru_RU:
                layout = Language.en_US;
                break;

            case Language.en_US:
                layout = Language.ru_RU;
                break;

            default:
                layout = Language.en_US;
                break;
            }
            WinApi.PostMessage(hWnd, WinApi.WM_INPUTLANGCHANGEREQUEST, IntPtr.Zero,
                               WinApi.LoadKeyboardLayout(string.Format("{0:X8}", (int)layout), WinApi.KLF_ACTIVATE));
        }
 public static void SetLayout(IntPtr hWnd, Language layout)
 {
     WinApi.PostMessage(hWnd, WinApi.WM_INPUTLANGCHANGEREQUEST, IntPtr.Zero,
                        WinApi.LoadKeyboardLayout(string.Format("{0:X8}", (int)layout), WinApi.KLF_ACTIVATE));
 }