How to kill an application from code Compact Framework

  • Thread starter Thread starter Pat Reddy
  • Start date Start date
P

Pat Reddy

I have 2 applications that I've written for Windows Mobile 2003. When
application A is ran I want it to kill application B if it's running and
then start it up again after application B is shutdown.

I've heard that System.Diagnostics.Process is what I want to use, but
this doesn't exist in the CF.

Thanks.

Pat Reddy
Industrial Controls Engineer
MAVERICK Technologies
 
OpenNETCF has that, see www.opennetcf.org, but since you've written both
applications, write something for notification that will allow this to be
done cleanly, rather than with TerminateProcess, which is a bad idea. Maybe
you'll pass a message to all top-level windows indicating "application A,
time to exit" or something like that, or maybe you'll create a global named
event that an application can set to cause you to exit.

Paul T.
 
Back
Top