Invoke a VB application when system shutsdown

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maheshgupta0248
    New Member
    • Oct 2008
    • 14

    Invoke a VB application when system shutsdown

    Hi All,

    Can anyone give me an idea, I have a VB6.0 application such that it should be invoked when the user system shuts down, When I close my application the windows should shut down normally...

    Is there any event kind of stuff in VB6.0 to invoked when the user shutdown his windows PC, or any method


    Thanks in Advance
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    when the windows shuts down it kills all the running processes so may not call another process.

    Comment

    • maheshgupta0248
      New Member
      • Oct 2008
      • 14

      #3
      Originally posted by debasisdas
      when the windows shuts down it kills all the running processes so may not call another process.

      I got ur point... before starting to kill all the processes... is there any chance to hold the killing and call new process...

      Comment

      • gsgurdeep
        New Member
        • Apr 2007
        • 94

        #4
        use "shutdown -a" to stop the shutdown of system....
        but i do not know the way to call it on shut down......

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          but what is the point in trying to start another application ,while system is shutting down. What exactly you are trying to do ?

          Comment

          • joedeene
            Contributor
            • Jul 2008
            • 579

            #6
            Originally posted by maheshgupta0248
            I got ur point... before starting to kill all the processes... is there any chance to hold the killing and call new process...
            Since Windows does kill all processes, and since it would be fairly hard having your application startup while Windows is shutting down, how about having your program in the System Tray at the bottom right, and it might be simpler to check too since your application is open, not just opening when shutting down...But i'm not sure to check if it's shutting down...

            joedeene

            Comment

            • maheshgupta0248
              New Member
              • Oct 2008
              • 14

              #7
              Originally posted by gsgurdeep
              use "shutdown -a" to stop the shutdown of system....
              but i do not know the way to call it on shut down......
              Oh thanks buddy "shutdown -a" can be a good option I will make a try and get back to u

              Comment

              • debasisdas
                Recognized Expert Expert
                • Dec 2006
                • 8119

                #8
                for windows your applications just runs another process.
                So when windows shutsdown that will kill all other processes along with your application.

                Comment

                Working...