Y
yxq
Hello,
I start an Internet Explorer process with appointed window title(i.e. TEST),
and wait for the user to abort it.
the code below engross 100% CPU resource, how ameliorate the code? Thank
you.
**********************************************************
Dim objPro As New Process
objPro.StartInfo.FileName = "explorer.exe"
objPro.StartInfo.Arguments = "http://TEST.com/"
objPro.Start()
System.Threading.Thread.CurrentThread.Sleep(10000)
re:
For Each a As Process In Process.GetProcesses
If InStr(a.MainWindowTitle.ToLower, "test") > 0 Then
GoTo re
End If
Next
I start an Internet Explorer process with appointed window title(i.e. TEST),
and wait for the user to abort it.
the code below engross 100% CPU resource, how ameliorate the code? Thank
you.
**********************************************************
Dim objPro As New Process
objPro.StartInfo.FileName = "explorer.exe"
objPro.StartInfo.Arguments = "http://TEST.com/"
objPro.Start()
System.Threading.Thread.CurrentThread.Sleep(10000)
re:
For Each a As Process In Process.GetProcesses
If InStr(a.MainWindowTitle.ToLower, "test") > 0 Then
GoTo re
End If
Next