Hooking Keyboard to detect keystrokes when program not in focus

Posted on 2003-02-23
Medium Priority
Last Modified: 2010-04-04
Could anyone point me to the direction of some Tutorials on how to Hook the keyboard usings the windows API to capture keystrokes,
I would liek to be able to do this while the window is not in focus, to my knowledge his requires creating a DLL and an EXE but i simply have no idea on how to code them.
What i need to be able to do is Hide My window when option is selected in program, which is acomplished easly Via the form1.hide command. and  to show it simply form1.show; but i need to be able to activate Show Via a key combo on the keybord, So if anyone can Lend me a hand you can have my poits hehe :)
Question by:Iamien
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 11

Expert Comment

ID: 8004385
For only 20 pts ???
LVL 34

Expert Comment

ID: 8005142
you might look at EE question


which does not use a DLL
ask questions if you need more

Author Comment

ID: 8011665
Ok 50 pointer now.
I would like to know how to do the DLL one. i know its more code and if you need mroe poitns say so but would  love to be able to write on as needed, harder but more power. thanks
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 8011750
Sorry let me rephrase that. I'd prefer to  know how make a system keyboard hook, not just a memo keyboard hook :) thanks,
LVL 34

Accepted Solution

Slick812 earned 240 total points
ID: 8013196
The Journal Hook IS A SYSTEM HOOK. . . that Journal hook sends  ANY keyboard activity (asii text only) to your Memo, but it gets other keyboard as well. . . I guess you did not try that code. . . . if you are more interestedin a DLL hook then go to this page


Author Comment

ID: 8013218
Thanks just what i needed. just gotten home compiled and tested :) thanks now to figured it all out. Thanks just what  i needed :) points be yours :)

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question