【发布时间】:2015-01-09 11:05:31
【问题描述】:
我在加载事件中打开了 2 个 Ie
Dim Start As New ProcessStartInfo
Dim Windows As New ShellWindows ' ShellWindowsClass
Dim Count = Windows.Count
Start.FileName = "iexplore.exe"
Start.Arguments = "-private -nomerge " & "https://www.yahoo.com"
If WindowState = ProcessWindowStyle.Hidden Then
Start.WindowStyle = ProcessWindowStyle.Minimized
Else
Start.WindowStyle = WindowState
End If
Dim nos As Integer
nos = 2
For i = 1 To nos
Process.Start(Start)
Next
Application.DoEvents()
Threading.Thread.Sleep(1000)
For Each ie In New ShellWindows
If ie.LocationURL.Length < 1 Or InStr(ie.LocationURL, "yahoo.com") > 1 Then
ie.ToolBar = False
ie.StatusBar = True
ie.AddressBar = False
ie.MenuBar = False
End If
Application.DoEvents()
Next
这段代码很好,可以打开 2 个 Ie 窗口 接下来如何将两个窗口导航到 google.com
我正在尝试这些代码 Dim ie As InternetExplorer 对于每个 ie 在新的 ShellWindows 中 如果 InStr(ie.LocationURL, "yahoo.com") > 1 那么 ie.Navigate("http://www.google.com) 结束如果
我收到了这个错误
请求的资源正在使用中。 (HRESULT 异常:0x800700AA) 下一个
【问题讨论】:
标签: vb.net visual-studio-2010 internet-explorer-9