Solved

Monitoring KeyStrokes

Posted on 2002-05-29
12
228 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
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 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

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…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

740 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