PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework detect shutdown of other application

Reply

detect shutdown of other application

 
Thread Tools Rate Thread
Old 25-11-2004, 07:49 AM   #1
=?Utf-8?B?Z2VvcmcgYW5kZXJzc29u?=
Guest
 
Posts: n/a
Default detect shutdown of other application


hi

i have a little application that is used to start a specific application
(for example Word). my application is now supposed to run all the time the
other application is running. as soon as the other application is closed by
the user, my little application should also shutdown...

so, is there a way, that my application 'listens' when the other application
is closed?

tx for any help

georg
  Reply With Quote
Old 25-11-2004, 08:59 AM   #2
Jon Skeet [C# MVP]
Guest
 
Posts: n/a
Default Re: detect shutdown of other application

<=?Utf-8?B?Z2VvcmcgYW5kZXJzc29u?= <georg
andersson@discussions.microsoft.com>> wrote:
> i have a little application that is used to start a specific application
> (for example Word). my application is now supposed to run all the time the
> other application is running. as soon as the other application is closed by
> the user, my little application should also shutdown...
>
> so, is there a way, that my application 'listens' when the other application
> is closed?


You could have one thread which calls Process.WaitForExit, and then
shuts the rest of the applicaiton down when that call returns.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off