Dim x
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_F1 = &H1 'sol tuş
Private Const VK_F2 = &H4 ' orta tuş
Private Const VK_F3 = &H2 'sag tuş
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Label1 = x
If GetAsyncKeyState(VK_F1) Then
x = "sol tuşa basıldı"
End If
If GetAsyncKeyState(VK_F2) Then
x = "orta tuşa basıldı"
End If
If GetAsyncKeyState(VK_F3) Then
x = "sag tuşa basıldı"
End If
End Sub
__________________