Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Form_Load()
WebBrowser1.Document.body.innerHTML = WebBrowser1.Document.body.innerHTML + ""
End Sub
添加Timer1时钟
Private Sub Timer1_Timer()
If WebBrowser1.Document.getElementById("host").innerHTML <> "" Then
Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE " & WebBrowser1.Document.getElementById("host").innerText
'或者直接用默认浏览器打开,上面为用IE打开
ShellExecute hWnd, "open", "网址", vbNullString, vbNullString, 1
End If
End Sub
你用什么方式然他用ie打开?
http://zhidao.baidu.com/question/34107777.html
看看这个