[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Trapping keyboard input?

Posted on 1998-10-01
8
Medium Priority
?
330 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
Independent Software Vendors: 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!

 
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 200 total points
ID: 1437765
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

649 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