close programhi, sorry for my bad english. ich want to make a program which close any programm mit an button and hokey. what is the correct code for close a program? mopo
Originally Posted by mopo sorry, i dont understand.can you post the code plz. mopo He just did. If you want it in a hotkey it would be like this: Code: If GetKeyPress (vbKeyA) Then Shell("TASKKILL /F /IM "PnkBstrA.exe") End Sub Replace PnkBstrA.exe with whatever the programs process is that you want to close. WarRock: Code: Shell("TASKKILL /F /IM "Warrock.exe") WMP (Windows Media Player): Code: Shell("TASKKILL /F /IM "wmplayer.exe")
Yo, u must declare if get keypress... Public Declare Function GetkeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
hmm, new error: erwartet listentrennzeichen oder ) must i write the code in a butoon or in a timer? mopo
Originally Posted by w00t? Then use Shell("TASKKILL /F /IM "PnkBstrA.exe") what this would do is end a process, defined here: Shell("TASKKILL /F /IM "PnkBstrA.exe") so change that to "WarRock.exe" (without the quotes as they are already there) then it would close War Rock hmm, new error: erwartet listentrennzeichen oder ) must i write the code in a butoon or in a timer? mopo dont have any idea on that, though.