something like this
Process[] processes = Process.GetProcesses();
foreach(Process process in processes){
if(process.MainWindowTitle == "SomethingWhatIWant"){
process.CloseMainWindow();
// or if it is not having main window then kill it
// use only one of this, dont need both
process.Kill();
}
}
Mihir Solanki
http://www.mihirsolanki.com Hi,
I have a need to create an app that will check on my pc what apps
are running and if one is found that shouldn't be running, shut it
down. How can I do this in c# or what areas should I be looking at in
the framework? Code samples or snips appreciated.
Thanks,
JJ