Click here to Skip to main content
16,004,924 members
Home / Discussions / C#
   

C#

 
QuestionSession, Cache or Viewstate? Pin
ss.mmm14-Sep-07 10:30
ss.mmm14-Sep-07 10:30 
AnswerRe: Session, Cache or Viewstate? Pin
mr.mohsen14-Sep-07 11:38
mr.mohsen14-Sep-07 11:38 
QuestionWhich interface to use to select the whole page for search? Pin
Ahmad Zaidi14-Sep-07 10:27
Ahmad Zaidi14-Sep-07 10:27 
QuestionUsing Process Start Pin
TheJudeDude14-Sep-07 9:41
TheJudeDude14-Sep-07 9:41 
AnswerRe: Using Process Start Pin
Pete O'Hanlon14-Sep-07 10:33
mvePete O'Hanlon14-Sep-07 10:33 
GeneralRe: Using Process Start Pin
TheJudeDude14-Sep-07 10:36
TheJudeDude14-Sep-07 10:36 
GeneralRe: Using Process Start Pin
TheJudeDude14-Sep-07 10:45
TheJudeDude14-Sep-07 10:45 
GeneralRe: Using Process Start Pin
Giorgi Dalakishvili14-Sep-07 11:14
mentorGiorgi Dalakishvili14-Sep-07 11:14 
TheJudeDude wrote:
Is there a way to check if the process started by Process.Start is finished before moving on to the next one?

Yes there is. You can use either Process.HasExited Property to determine that or Process.WaitForExit method to wait for a process exit.
<br />
Process myproc=Process.Start("c:\\Program Files\\Winzip\\wzzip.exe ",strArgs);<br />
<br />
if(myproc.HasExited)<br />
{<br />
    //Yes, it has exited, process the file<br />
}<br />
else<br />
{<br />
   //No it hasn't, perhaps you can put it in a loop and use sleep but make sure you exit the loop<br />
}<br />

Or
<br />
Process myproc=Process.Start("c:\\Program Files\\Winzip\\wzzip.exe ",strArgs);<br />
<br />
myproc.WaitForExit(); <br />
//Now the process has exited.<br />

WaitForExit() waits an infinite amount of time for the process to exit. This can cause an application to stop responding so I recommend you use overload ofWaitForExit which except amount of time to wait for and returns a boolean value indicating whether the process has exited or not





#region signature
my articles
#endregion

AnswerRe: Using Process Start Pin
Nathan Holt at EMOM14-Sep-07 10:45
Nathan Holt at EMOM14-Sep-07 10:45 
GeneralRe: Using Process Start Pin
TheJudeDude14-Sep-07 10:53
TheJudeDude14-Sep-07 10:53 
GeneralRe: Using Process Start Pin
Giorgi Dalakishvili14-Sep-07 11:16
mentorGiorgi Dalakishvili14-Sep-07 11:16 
GeneralRe: Using Process Start Pin
TheJudeDude14-Sep-07 11:21
TheJudeDude14-Sep-07 11:21 
GeneralRe: Using Process Start Pin
Giorgi Dalakishvili14-Sep-07 11:30
mentorGiorgi Dalakishvili14-Sep-07 11:30 
GeneralRe: Using Process Start Pin
TheJudeDude14-Sep-07 14:39
TheJudeDude14-Sep-07 14:39 
GeneralRe: Using Process Start Pin
Giorgi Dalakishvili14-Sep-07 22:53
mentorGiorgi Dalakishvili14-Sep-07 22:53 
Questionhow to playBack streaming video ? Pin
hdv21214-Sep-07 9:18
hdv21214-Sep-07 9:18 
AnswerRe: how to playBack streaming video ? Pin
Dave Kreskowiak14-Sep-07 9:27
mveDave Kreskowiak14-Sep-07 9:27 
GeneralRe: how to playBack streaming video ? Pin
hdv21214-Sep-07 11:15
hdv21214-Sep-07 11:15 
QuestionBreak Points in my Custom Attribute class Pin
Sha Sea14-Sep-07 7:26
Sha Sea14-Sep-07 7:26 
AnswerRe: Break Points in my Custom Attribute class Pin
Nathan Holt at EMOM14-Sep-07 10:56
Nathan Holt at EMOM14-Sep-07 10:56 
GeneralRe: Break Points in my Custom Attribute class Pin
Sha Sea14-Sep-07 11:33
Sha Sea14-Sep-07 11:33 
GeneralRe: Break Points in my Custom Attribute class Pin
Nathan Holt at EMOM14-Sep-07 12:17
Nathan Holt at EMOM14-Sep-07 12:17 
QuestionForce file delete Pin
jmaalouly14-Sep-07 5:42
jmaalouly14-Sep-07 5:42 
AnswerRe: Force file delete Pin
Giorgi Dalakishvili14-Sep-07 6:35
mentorGiorgi Dalakishvili14-Sep-07 6:35 
AnswerRe: Force file delete Pin
Dave Kreskowiak14-Sep-07 8:10
mveDave Kreskowiak14-Sep-07 8:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.