CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Key State

  1. #1
    Join Date
    May 1999
    Posts
    13

    Key State

    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

  2. #2
    Join Date
    Apr 1999
    Posts
    45

    Re: Key State

    I believe you have to subclass the keystroke capture of keyboard state outside the VB window as you would do for mouse events.

    Gordito


  3. #3
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Key State

    Try creating a Hook procedure for keybaord.
    A hook procedure is system-wide.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured