How to tell if machine shutting down.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Verona

    How to tell if machine shutting down.

    I have a program that sits in the system tray and spawns off a number of sub
    processes.

    For some reason, when this is running on a system, Windows will not shutdown
    without manually shutting it down.

    Is there some way within my code that I can pick up that Windows wants to
    shut down and then do an orderly shutdown of the processes?

    Thanks in advance
    Simon


  • Herfried K. Wagner [MVP]

    #2
    Re: How to tell if machine shutting down.

    "Simon Verona" <news@aphrodite uk.com> schrieb:[color=blue]
    > Is there some way within my code that I can pick up that Windows wants to
    > shut down and then do an orderly shutdown of the processes?[/color]

    Handle 'SystemEvents.S essionEnding'.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • Simon Verona

      #3
      Re: How to tell if machine shutting down.

      Thanks :)
      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
      news:%23BpXdiom FHA.764@TK2MSFT NGP14.phx.gbl.. .[color=blue]
      > "Simon Verona" <news@aphrodite uk.com> schrieb:[color=green]
      >> Is there some way within my code that I can pick up that Windows wants to
      >> shut down and then do an orderly shutdown of the processes?[/color]
      >
      > Handle 'SystemEvents.S essionEnding'.
      >
      > --
      > M S Herfried K. Wagner
      > M V P <URL:http://dotnet.mvps.org/>
      > V B <URL:http://classicvb.org/petition/>[/color]


      Comment

      Working...