Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Article Writing
  4. How do I force closing of other apps from within my app

How do I force closing of other apps from within my app

Scheduled Pinned Locked Moved Article Writing
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SAK
    wrote on last edited by
    #1

    I want the ability to close other applications running, but I want to 'force' a close, meaning that I dont want any dialog boxes prompting me with stuff like "app is not responding" or "do you want to save changed document". Is there a way to close other apps without having these popup dialog boxes appear. Similiar to task manager but with no pop-up dialog boxes. Most appreciated, SAK

    R 1 Reply Last reply
    0
    • S SAK

      I want the ability to close other applications running, but I want to 'force' a close, meaning that I dont want any dialog boxes prompting me with stuff like "app is not responding" or "do you want to save changed document". Is there a way to close other apps without having these popup dialog boxes appear. Similiar to task manager but with no pop-up dialog boxes. Most appreciated, SAK

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      See TerminateProcess(). The calling process will need to have appropriate rights to kill processes. /ravi "There is always one more bug..." ravib@ravib.com http://www.ravib.com

      B 1 Reply Last reply
      0
      • R Ravi Bhavnani

        See TerminateProcess(). The calling process will need to have appropriate rights to kill processes. /ravi "There is always one more bug..." ravib@ravib.com http://www.ravib.com

        B Offline
        B Offline
        Bills
        wrote on last edited by
        #3

        TerminateProcess may be a bit severe, particularly if it is not a child of your app's process. First, I would try sending a WM_CLOSE message to the app's main window. Only when you can't close the app by any other means would I invoke TerminateProcess. Bill Stott, Contractor

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups