level 1
dim b as boolean
dim pid as long
private sub form_Keydown(KeyCode As Integer, Shift As Integer)
if KeyCode = vbkeyF1 then
b = not b
if b = true then
pid = shell ("C:\我的程序.exe")
else
shell "taskkill /PID " & pid & "/F /T"
pid = 0
end if
end if
end sub
private sub form_load()
b = false
end sub
2017年07月05日 02点07分