daleG
Oct 31st, 2002, 11:20 AM
I am looping system.diagnostics.process.start this code works when I put a break in the code and single step it thru waiting for each line to finish. but if I don't use a break or step it thru quickly the process I am trying to start doesn't have a chance to finish the first time around before it loops and is ready to start again. Is there a way to make it wait for a process before moving on to the next?
Dim ProgramsSelected As Int16
Dim count As Int16 = 0
ProgramsSelected = newProgramList.SelectedItems.Count
Do
count += 1
System.Diagnostics.Process.Start _(newProgramList.SelectedItem)
newProgramList.SetSelected _(newProgramList.SelectedIndex, False)
Loop Until count = ProgramsSelected
:confused:
Dim ProgramsSelected As Int16
Dim count As Int16 = 0
ProgramsSelected = newProgramList.SelectedItems.Count
Do
count += 1
System.Diagnostics.Process.Start _(newProgramList.SelectedItem)
newProgramList.SetSelected _(newProgramList.SelectedIndex, False)
Loop Until count = ProgramsSelected
:confused: