Solved

Record key strokes?

Posted on 1998-07-07
1
288 Views
Last Modified: 2010-05-03
Hello,
I am wondering how I would go about recording all key strokes typed while my program would be running in the background (tsr?)
Any help at all would be great.

==Rob
0
Comment
Question by:rob2000
1 Comment
 
LVL 1

Accepted Solution

by:
khaledc earned 10 total points
ID: 1465179
First you have to know which form has the focus, then under the event sub "KeyPress" you can tell which Ascii character has been pressed, the following is an example:
Private Sub Form_KeyPress(KeyAscii As Integer)
    MsgBox chr$(KeyAscii)
End Sub
To try this example, paste the code into the decleration part of a Form and then Press F5.
Regards
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

770 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