Posted: Fri Jan 25, 2008 9:24 am Post subject: C# Process detecting
i have a form and while it's running i wanna check if cmd is running but there's one problem..
that's my code
Code:
Process[] cmdCheck = Process.GetProcessByName("cmd");
do
{
cmdCheck = Process.GetProcessByName("cmd");
}
while (cmdCheck.Length != 0);
so far so good it does his job.. but while cmd is running the form get stucks, i dont have access to the form
and if i'll click inside the form so it'll say that he's not responsing (i think it's larging cpu usnig while searching the process)
so what i'm asking is there anyway that i'll detect process with my form without it get stuck at the time the cmd (or the process i want to detect) is running ? _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum