bunu Imports kısmına ekliyosun
Kod:
Public Declare Sub mouse_event Lib "user32" (ByVal dwFlags As UInteger, ByVal dx As UInteger, ByVal dy As UInteger, ByVal dwData As UInteger, ByVal dwExtraInfo As Integer)
<DllImport("user32.dll")>
Public Shared Function GetAsyncKeyState(ByVal vKey As System.Windows.Forms.Keys) As Short
End Function
böyle bir döngü olarak kullanabilirsin
Kod:
If GetAsyncKeyState(Keys.F8) Then
'kodlar çalışıyor
MessageBox.Show("KOD ÇALIŞTIRILDI.", "UYARI")
End If