What you are wanting to do is called a Hook. It is difficult to implement in VB without a custom control or DLL.
Here are examples of such a control:
http://www.desaware.com/De
and
http://www.visual-design.s
Main Topics
Browse All TopicsI'd like to know if it;s possible to have a program run in the background that traps keyboard strokes. So I can run the program and while I work in say a chat window or something the keystrokes will be recorded in a text file.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
What you are wanting to do is called a Hook. It is difficult to implement in VB without a custom control or DLL.
Here are examples of such a control:
http://www.desaware.com/De
and
http://www.visual-design.s
You surely can, but it's not so easy. You need to create a sustem keyboard hook. This hook is a procedure which will be executed every time a key is stroked under Windows. The worst part is that this procedure (called hook procedure) must be in a DLL. If you want to record a keystrokes of a given window or textbox, there is surely an easier way.
Two ways to do it: subclassing or hooks
1) Subclassing
http://support.microsoft.c
2) Hooks
http://support.microsoft.c
http://support.microsoft.c
Business Accounts
Answer for Membership
by: abhinavmPosted on 1998-10-01 at 21:30:50ID: 1437758
You can do it by using APIs. i don't have full details right now but its not very diificult. you have to get the handle of window whose event you want to captur, then you can get all the messages going to that window. then you can do whatever processing you want and send it back to window.
For this you have to take help on APIs