Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Caps Lock change event
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Caps Lock change event
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01230614
Message ID:
01230614
Vues:
71
Hi all,

I know I can get Caps Lock's key state by calling CapsLock(). I'd like to warn my users if the key is on when they enter login info through a form. On the login form, I set the KePreview to .t. and in the KeyPress event I've got the following code:
this.labelWarning.Visible = CapsLock() && Caption reads "Warning: Caps Lock key is on"
The problem is that when the Caps Lock key is turned off upon receiving the warning, the KeyPress event of the form does not fire, which means that the warning message remains on the screen.

Is there a simple way to intercept the Caps Lock key press event?

TIA
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform