?
Solved

Monitoring KeyStrokes

Posted on 2002-05-29
12
Medium Priority
?
231 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 600 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

765 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