Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
If GetAsyncKeyState(65) = -32767 Then
If GetAsyncKeyState(17) = -32767 Then
'Shell "taskkill.exe /f /im myname.exe"这里写结束进程
End If
End If
End Sub