【发布时间】:2017-10-29 03:14:23
【问题描述】:
我需要强制我的应用程序在 IE11 中打开几个链接(按钮很少 - 一个按钮下有一个链接)(无论是否设置为默认浏览器)。
我尝试了多种方法,但结果总是一样:
Process.Start("iexplore.exe", 地址)
它适用于 Firefox 或 Chrome,但适用于 IE - 它总是为每个链接打开新窗口。不管 IE 是否已经打开。
几年前我写过类似的东西,我猜想在 IE7 上工作......:
导入 SHDocVw
Dim internetExplorerInstances As New ShellWindows()
Dim foundIE As Boolean = False
foundIE = False
For Each ie As InternetExplorer In internetExplorerInstances
If ie.Name = "internet explorer" Then
ie.Navigate(address, &H800)
foundIE = True
Exit For
End If
Next
If Not foundIE Then
With oPro
.StartInfo.UseShellExecute = True
.StartInfo.Arguments = address
.StartInfo.FileName = "iexplore"
.Start()
End With
End If
但是今天,在 IE 11 中它不起作用....我的意思是它仍然在新窗口中打开 URL。
您有任何想法如何以编程方式强制 IE11 在新选项卡中打开链接,而不是在新窗口中?
【问题讨论】:
标签: vb.net hyperlink tabs internet-explorer-11