Thread: close program

Results 1 to 12 of 12
  1. #1
    mopo's Avatar
    Join Date
    Sep 2007
    Posts
    60
    Reputation
    10
    Thanks
    0

    close program

    hi,

    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

  2. #2
    w00t?'s Avatar
    Join Date
    Jul 2007
    Gender
    male
    Posts
    257
    Reputation
    10
    Thanks
    29
    To close application is

    Code:
    End

  3. #3
    ZeaS's Avatar
    Join Date
    Feb 2007
    Posts
    738
    Reputation
    15
    Thanks
    265
    hotkey
    (if getkeypress(vbkeyA) then
    end
    end sub

  4. #4
    mopo's Avatar
    Join Date
    Sep 2007
    Posts
    60
    Reputation
    10
    Thanks
    0
    thx,

    but i want to close a program like warrock or media player.

    not the hack.

    mopo

  5. #5
    w00t?'s Avatar
    Join Date
    Jul 2007
    Gender
    male
    Posts
    257
    Reputation
    10
    Thanks
    29
    Then use

    Shell("TASKKILL /F /IM "PnkBstrA.exe")

  6. #6
    mopo's Avatar
    Join Date
    Sep 2007
    Posts
    60
    Reputation
    10
    Thanks
    0
    sorry,

    i dont understand.can you post the code plz.

    mopo

  7. #7
    wr194t's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Location
    Guess.
    Posts
    3,016
    Reputation
    21
    Thanks
    361
    My Mood
    Hot
    Quote Originally Posted by mopo View Post
    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")

  8. #8
    mopo's Avatar
    Join Date
    Sep 2007
    Posts
    60
    Reputation
    10
    Thanks
    0
    i get an error.

    "syntaxfehler"

    mopo

  9. #9
    w00t?'s Avatar
    Join Date
    Jul 2007
    Gender
    male
    Posts
    257
    Reputation
    10
    Thanks
    29
    Yo, u must declare if get keypress...

    Public Declare Function GetkeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer

  10. #10
    mopo's Avatar
    Join Date
    Sep 2007
    Posts
    60
    Reputation
    10
    Thanks
    0
    oh sorry,

    i forgot.

    ty

  11. #11
    mopo's Avatar
    Join Date
    Sep 2007
    Posts
    60
    Reputation
    10
    Thanks
    0
    hmm,

    new error:

    erwartet listentrennzeichen oder )

    must i write the code in a butoon or in a timer?

    mopo

  12. #12
    olie122333's Avatar
    Join Date
    Oct 2007
    Gender
    male
    Posts
    438
    Reputation
    10
    Thanks
    20
    Quote Originally Posted by w00t? View Post
    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.
    Last edited by olie122333; 11-01-2007 at 10:12 AM. Reason: to help with an extra problem

Similar Threads

  1. [Help] debugger and closing programs
    By Dimedrol1536 in forum Piercing Blow Hack Coding/Source Code
    Replies: 1
    Last Post: 07-12-2011, 04:51 AM
  2. Code to close Program?
    By Katie_Perry in forum Visual Basic Programming
    Replies: 11
    Last Post: 09-29-2009, 06:49 AM
  3. [TuT]Preventing your Program from Closing
    By Iamazn in forum Visual Basic Programming
    Replies: 4
    Last Post: 09-09-2009, 06:10 PM
  4. Smart Close Program - For Errors
    By Obey in forum WarRock - International Hacks
    Replies: 19
    Last Post: 06-10-2009, 04:42 PM
  5. [Help] How to close a program with a hotkey (VB6).
    By wr194t in forum Visual Basic Programming
    Replies: 7
    Last Post: 11-22-2007, 06:07 AM