展开全部
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
添加一个时间控件。然后复制上代码以后。你控ctrl+a就OK了。
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
添加一个时间控件。然后复制上代码以后。你控ctrl+a就OK了。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询