Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CAPSLOCK

Status
Not open for further replies.

hannec

Programmer
Mar 22, 2004
37
BE
Hallo,

how does the application knows that the user hits the capslock key? Something like 'on key label'.

Thanks
 
Thanks Geoff, i know the capslock function. I can use this function in the gotfocus event. But how can i know the users hits the capslock button?
In the init event of my form i can say : on key label F8 do procedure_f8. Can i do the same with capslock ?

Thanks
 
I wonder why you want to react to a keypress of CAPSLOCK. The special purpose of the CAPSLOCK key is, that if is set ON, all further keystrokes will be made with an automatic virtual SHIFT key pressed. CAPSLOCK() is enough to find out the setting. If you want to warn the user at a login prompt, you might just read that out at gotfocus (like you said yourself), you also might recheck the status of CAPSLOCK() in the keypress event of the password textbox and warn the user that he turned capslock on...

Bye, Olaf.
 
Thanks Tamar and Olaf for the information. Very helpfull.
 
One use I can imagine for seeing when Capslock is pressed is to imitate VFP's status bar, which shows "CAPS" when capslock is on.

If this is the purpose, the Microsoft Status Bar MSCOMCTLLIB.SBARCTRL.2 includes this capability, if you insert a panel into it then change the panel's "Style" to 1 "Caps".

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top