Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Caps Lock change event
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01230614
Message ID:
01230640
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
Hello Dawa

In the get focus of the textbox you could fire a timer that checks the status and updates your message (every second or so), in the lost focus turn the timer off.

Another choice, depending on security requirements is to not make your logins case sensitive, you could enforce password length to make it more secure.

I support case sensitive logins, but count as a match the Exact Login OR the Reverse Caps Lock login. This way they still need to know the password with casing, but I don't care about the capslock status and is only minimally less secure.

EX:

Password='aBcDeFg5678'

Will accept
Password='AbCdEfG5678'

But Not
Password='abcdefg5678'
Password='ABCDEFG5678'

Hope that helps

Bob

>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
'If the people lead, the leaders will follow'
'War does not determine who is RIGHT, just who is LEFT'
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform