Mega Code Archive

 
Categories / Delphi / Hardware
 

Switch the keyboard layout for the application

Title: switch the keyboard layout for the application? { Der folgende Code aktiviert als Beispiel das griechische Tastatur Layout für diese Anwendung. Das funktioniert nur, wenn das gewünschte Layout installiert ist, ansonsten passiert nichts. } { Following code will activate 'Greek' Keyboard Layout for the application. This would only Load the Keyboard Layouts which are installed on that very machine otherwise there would be no affect. } procedure TForm1.Button1Click(Sender: TObject); var LangIdentifier: String; begin LangIdentifier := '00000408'; //'0000408' is the Language Identifier for Greek LoadKeyboardLayout(PChar(LangIdentifier), KLF_ACTIVATE); end;