chukalv hat folgendes geschrieben: |
Zitat: | read in SDK help: ActivateKeyboardLayout
I think this is what you need. |
The ActivateKeyboardLayout function sets the input locale identifier (formerly called the keyboard layout handle) for the calling thread or the current process...
Already knew that, but it also changes the keyboard layout only for my application, not system-wide... |
Sorry, you are right. I tried to find the point in the registry where the KL for a new program ist defined, but in the meantime i am quite sure, that this information is not in the registry at all, and within windows there is also no such thing as a system wide KL. My theory of operation is: there is a mechanism to setup a default KL for a user at Logon, and this KL is inherited by starting programs in the same way as the other environment (but there is no entry in the environment like a variable for the keyboard). Therefore you will encounter the same problems as with the environment: you can set your own one, but not the environment of other programs.
A already working program will use its own KL no matter what happens outside, so there is no way to switch the "system" without restarting all running programs. A new system or default KL would affect only programs starting in the future.
I tried to set the "system" KL by hotkeys with funny results: it is possible to have "EN" in the taskbar and nothing else running, but notepad (like all other programs) starts with "DE". The screen and the Taskbar itself may have their (may be different) KL, but i dont know from where a new process inherits its KL. I think that this cannot be altered after logon, because it behaves the same way as any other process in the system, which has a individual KL from startup.
sy Reinhard