Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to change the keyboard Language ?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00387299
Message ID:
00387314
Vues:
13
>Is there any way to change the keyboard Language in VB, like if you have to keyboard languages installed in windows English & Arabic, to switch to Arabic I have to click Alt+Shit the right side of the keyboard then the keyboard typing will be change to Arabic.
>
>I want to make this in a VB code and put it in the application.
>

You'll need to implement the ActivateKeyboardLayout() API call; I don't have code to give you to do this, but it's documented in the MSDN, and is not that complex to implement; ensure that the deired keyboard layouts are loaded into the system using the LoadKeyboardLayout() call before you might need any given layout, you retrieve an array of available Keyboard Layout handles using GetKeyboardLayoutList, spin through the resulting array of handles and retrieve the name of each layout available using GetKeyboardLayoutName(), and once you have the list associated with the handles, you can switch keyboard layouts by calling ActivateKeyboardLayout() with the hKL of the keyboard layout you want to have active at the moment. The Keyboard Layout assignment is associated with the current execution thread; it does not change the apparent layout for other processes running on the system.

The APIs related to these functions are discussed in detail in Chapter 9 of "Windows NT Win32 API SuperBible" by Richard Simon; it assumes a fair degree of knowledge of C/C++, sice all the sample code is provided in VC++.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform