G
gaxjyxq
Guest
I want to wait for a process exited, use Process.HasExited or Process.WaitForExit? what different for two functions?
Dim p As New Process
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
p.StartInfo.FileName = "test.exe"
p.Start()
Do Until p.HasExited = True Or use p.WaitForExit()
Threading.Thread.Sleep(100)
Loop
If p.ExitCode = 0 Then
Return True
Else
Return False
End If
Continue reading...
Dim p As New Process
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
p.StartInfo.FileName = "test.exe"
p.Start()
Do Until p.HasExited = True Or use p.WaitForExit()
Threading.Thread.Sleep(100)
Loop
If p.ExitCode = 0 Then
Return True
Else
Return False
End If
Continue reading...