Click to See Complete Forum and Search --> : Key State


Talking
June 2nd, 1999, 01:50 PM
My small app needs to know whether the Caps Lock key is on or off. Various bits of code using GetKeyboardState etc all work whilst the project is running in VB. If I open Notepad and click in its window instead of in my vb code window, the app seems unable to detect the Caps Lock state any more. Any ideas?

Voice Recognition, Microphones, and Text-To-Speech.
Products, Support, and International Sales.
www.talking.co.uk

Gordito Supreme
June 6th, 1999, 09:53 AM
I believe you have to subclass the keystroke capture of keyboard state outside the VB window as you would do for mouse events.

Gordito

Ravi Kiran
June 7th, 1999, 01:14 AM
Try creating a Hook procedure for keybaord.
A hook procedure is system-wide.