-1

The application will be installed by users from different countries, and what languages ​​the keyboard layout of a specific user is unknown. We need a way with which the keyboard layout will change.

enter image description here

1 Answers1

-2
    [DllImport("user32.dll")]
    public static extern IntPtr GetForegroundWindow();
    [DllImport("user32.dll", CharSet = CharSet.Auto)]
    public static extern bool PostMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
    public void ChangeLanguage()
    {
        PostMessage(GetForegroundWindow(), 0x0050, 2, 0);
    }