keyboard layout for a selected window
-
Hello, Im looking for a way of changing the keyboard layout for a user-defines window. Any one know how to achieve it ? or any software that does it ?
Hi I don't know if there is a way to change your keyboard layout using the framework (managed code) but I think in famework 1.1 you should use the windows API to do so first declare following API function in your class
[DllImport("user32")] private static extern int LoadKeyboardLayout(string pwszKLID,long flags);
Then you can call this function to change the keyboard layout. pwszKLID is a pointer to a buffer that contains the locale name.You should know the locale ID for your prefered language ( I think that you can find them on MSDN) I don't know what are the flags ( you can find its values on MSDN) but we are using 1 and it's working fine. Good Luck