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. General Programming
  3. Visual Basic
  4. Intercept shutdown?

Intercept shutdown?

Scheduled Pinned Locked Moved Visual Basic
question
3 Posts 2 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.
  • J Offline
    J Offline
    JDMils
    wrote on last edited by
    #1

    I'm looking for a way to intercept the shutdown/log off of a computer to run my own app then let the computer continue to shutdown/log off. Is this possible and how?

    | +-- JDMils | +-- VB6 +-- VB Dot Net |

    C 1 Reply Last reply
    0
    • J JDMils

      I'm looking for a way to intercept the shutdown/log off of a computer to run my own app then let the computer continue to shutdown/log off. Is this possible and how?

      | +-- JDMils | +-- VB6 +-- VB Dot Net |

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      One obvious thing to do is to run your code ( it has to be running no matter what ) and just perform your action in your programs close event handler.

      J 1 Reply Last reply
      0
      • C Christian Graus

        One obvious thing to do is to run your code ( it has to be running no matter what ) and just perform your action in your programs close event handler.

        J Offline
        J Offline
        JDMils
        wrote on last edited by
        #3

        The shutdown/log off action is started by the user. My app needs to detect when this happens then run an external application. Upto this point, I am OK. When the external application finishes, I need my app to continue with the shutdown/logoff. How do I detect whether the computer was originally shutting down or logging off? Another question, is once my application completes, and it issues a shutdown/log off to continue the original request (by the user) to shutdown/log off, how do I stop my app from running again!? LoL Thanks

        | +-- JDMils | +-- VB6 +-- VB Dot Net |

        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