 |
| Switching between keyboard layouts |
User rating: 9.33/10 (3 votes) | |
|
|
 |
 |
Versions: click to open |
 |
|
 |
 |
| Before you begin: |
 |
The form in this code sample displays input languages available for the current process and allows switching between them.

In VFP9, this form also tracks input language changes initiated by a hot key or via Windows Taskbar. A form must have the keyboard focus to immediately reflect a change in input language.

See also:
LanguageBar ActiveX control

Saving available locale records into a cursor
Retrieving national language settings
Capturing keyboard activity of another application using the Raw Input API
|
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 9.33/10 (3 votes) | |
| 4391 bytes Created: 2002-02-08 21:32:59 Modified: 2011-03-24 10:34:21 Visits in 7 days: 160 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
The keyboard layout status, if any shown in the taskbar, reflects the layout selection made on the form.
The name of the input locale identifier (keyboard layout) is a string composed of the hexadecimal value of the language identifier (low word) and a device identifier (high word).
For example, English (United States) layout has a language identifier of 0x0409, so this layout is named "00000409". The variants of it (such as the Dvorak layout) are named "00010409", "00020409", and so on.
The indentifiers in the list correspond to the current set of input locales used by the system. The LoadKeyboardLayout function activates selected input locale identifier.
* * *
List of Locale IDs, Input Locale, and Language Collection |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|