Hi
I want to create a c# program where i have to check processes which are currently running and close a particular of them can any one help me
Thanks.
bahed121
11
Junior Poster in Training
Recommended Answers
Jump to Postusing System.IO; using System.Diagnostics; //name is the process name passed to the funciton //public bool isProcRunning(String name) public void isProcRunning(String name) { foreach (Process clsProcess in Process.GetProcesses()) { if (clsProcess.ProcessName.Contains(name)) {//return true; clsProcess.CloseMainWindow(); } } // return false; }
All 3 Replies
Saikalyankumar
-2
Junior Poster in Training
abelLazm
183
Postaholic
bahed121
11
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.