المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Process Exit problem !



C# Programming
02-16-2010, 06:21 PM
Hi.

I have problem with process exit.
I'm using this code :
Process proc = new Process();
proc.StartInfo.FileName = str;
proc.Start();
proc.WaitForExit();
DoSomeThings();

This code sometimes not working.
For example ,I have opening Visual Studio. I want run process *.cs or *.cpp (Visual studio files) files. That files opened last Visual Studio.After that i don't know my process running or exited.
And i get InvalidOperationException.

How i can know my process running or exited?

Please help me.
Thanks,
Nematjon.We are haven't bug,just temporarily undecided problems.