Some notes on software development... RSS 2.0
# Wednesday, 19 March 2008

Note:- the code for this article is directly taken from Chris Tacke's Blog, see footer link.

If there is a process that you need to kill that does not have a running window i.e. an app that sits in the CE system tray you need to use the Kill method from the ProcessEntry class when using Smart Device Framework.

First you need to get a list of running processes. Then you compare each running process name to the name of the process you want to kill.
Then simply call the Kill method.


Warning: Calling the kill method will immediately shutdown the process. You could lose any unsaved data when killing a process this way.
If the process has a graphical window it is better to close the application gracefully by sending a close window message to the application, which in turn will close down correctly and save any data if it has been coded correctly ;)
To do that look here: Kill a process with SendMessage in Compact Framework

Chris Tacke blog article

Wednesday, 19 March 2008 16:23:42 (GMT Standard Time, UTC+00:00)  #    -

Sign In
Total Posts: 116
This Year: 0
This Month: 0
This Week: 0
Comments: 36
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2019
Hadrian Phillips

All Content © 2019, Hadrian Phillips
DasBlog theme 'Business' created by Christoph De Baene (delarou)