Solved

Monitoring KeyStrokes

Posted on 2002-05-29
12
230 Views
Last Modified: 2010-05-02
We need to write an application that monitors every single key stroke made on a computer, but have the monitoring application sitting in the background, completely invisible to the user.  Is there an API available that can help do this?  If so, how do we use it?

Ta.
0
Comment
Question by:Luke_Stephens
[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
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 7041388
You are after a Keylogger in effect. There are many commercially available applications that do this, also many freeware/shareware ones as well. The basic problem in creating such an application is that you cannot easily create a systemwide hook into the keyboard buffer. You have to have the callback process in a standard dll which cannot be created by VB. However there are a number of standard dlls created for this very purpose. One that I have used succesfully is from http://www.vbaccelerator.com the vbalhook.dll. There are also samples here that can be used to build exactly the sort of application you are interested in.
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7041494
You cna use Hooks

The WH_KEYBOARD and WH_KEYBOARD_LL intercept messages that relate to keyboard input.

The WH_JOURNALRECORD Hook receives mouse, keyboard and other hardware messages from the system.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7041522
Indeed corvanderlinden you can but you still need to use an additional dll to make this systemwide as vb can only handle application wide hooks.
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 28

Expert Comment

by:AzraSound
ID: 7041789
"Subclass Keyboard and Mouse Events in Other Applications (Version 2.0)"
http://www.freevbcode.com/ShowCode.Asp?ID=1610
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7041795
I knew Ark must have done something like this, I should have checked myself really.
0
 

Author Comment

by:Luke_Stephens
ID: 7041830
On a VB course at the moment, no WinZip, so I can't check that dll out yet.  I'm not ignoring you all though, cheers for your help so far...
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7041847
The link I pointed you to is done in pure VB
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7041854
If Ark shows up in this thread, he deserves the credit...that man does wonders in "low-level" VB
0
 

Author Comment

by:Luke_Stephens
ID: 7041877
It's in a zip file now mate.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 7041949
Aware of that...just offering additional commentary at no charge   ;-)
0
 

Author Comment

by:Luke_Stephens
ID: 7041984
Very kind of you!
0
 

Author Comment

by:Luke_Stephens
ID: 7072103
Cheers mate, sorry for the long silence - I was on a course and this lad wanted to know how to do this.  Don't know if he managed it but I want to close this question!

Luke
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

724 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