Io mi trovo lo stesso messaggio di errore utilizzando l' api GetAsyncKeyState, dato che non ho mai utilizzato le api in vb.net è possibile che sbaglio qualcosa:
Public Class Form1
Private Declare Ansi Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Short
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim result As Short
'invio
result = GetAsyncKeyState(Keys.Enter)
If result < 0 Then
MsgBox("Premuto invio")
End If
End Sub
End Class
![]()

Rispondi quotando