Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting Alt-Shift pression or language change
Message
 
À
13/02/2009 09:11:28
Reza Meamar
Homa Programming Group
Shiraz, Iran
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01381559
Message ID:
01381572
Vues:
60
Hi Reza,

The simplest way to find out which keyboard layout is active, would be to call GetKeyboardLayout API function (or GetAsyncKeyState) every second using a Timer. That should not slow down an application too much.

By the way, user can choose some other combination of keys, not ALT+SHIFT, to switch between keyboard layouts.

* * *
As for monitoring the keyboard state, API functions like WaitForSingleObject normally should be called in separate threads, which is not an option for VFP. The SetWindowsHookEx is not an option either because of callback procedures.

* * *
I will check other options and will let you know if I find anything.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform