Solved

Trapping keyboard input?

Posted on 1998-10-01
8
323 Views
Last Modified: 2010-04-30
I'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.
0
Comment
Question by:treyjeff
[X]
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
8 Comments
 
LVL 1

Expert Comment

by:abhinavm
ID: 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
0
 
LVL 4

Expert Comment

by:mcix
ID: 1437759
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/Desaware_Info/products/spy_works/spyinfo.htm
and
http://www.visual-design.se/VDGT/VDAMon.htm


0
 
LVL 12

Expert Comment

by:mark2150
ID: 1437760
Conversely you could load a DOS TSR prior to firing windows...
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 2

Expert Comment

by:polygon
ID: 1437761
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.
0
 
LVL 1

Author Comment

by:treyjeff
ID: 1437762
So does anyone know of an easy way?
0
 
LVL 3

Expert Comment

by:TheAnswerMan
ID: 1437763
Since you are wanting to spy on somone.  I reccommend going to a private detective shop and get yourself one of those miniature cameras and hide it over their shoulder.  Nice and Easy.  And you dont have to worry about and DLLs running.
0
 
LVL 1

Author Comment

by:treyjeff
ID: 1437764
There's always an ass in the crowd isn't there?  It is being used in a valid program.  If you have something that will help then let me know, or just keep your comments to yourself.
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 100 total points
ID: 1437765
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 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