I'm trying to emulate a program I once used which is called it ZapIt! for pocket pc,the idea is simple, kill a process or close Main Window that is the focus is on or is in the foreground, Using C# ofcourse.In Windows, I can kill or close a process by Name or PID, but how can I close a process that thefocus is on or is in the foreground