[VB]如何使点击新窗口仍然使用VB自己的窗口而不是IE浏览器
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
在窗体中插入一个WebBrowser1,然后在代码页写入: Dim StatusText As String Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean) Set nform = New Form1 Set ppDisp = nform.WebBrowser1.Object nform.Show End Sub Private Sub webbrowser1_documentcomplete(ByVal pDisp As Object, URL As Variant) MsgBox WebBrowser1.Document.Title Cancel = 0 Text1.Text = URL If URL = "/index.asp" Then Me.Width = 14000 Me.Height = 8000 End If End Sub Private Sub W_StatusTextChange(ByVal Text As String)
Label2.Caption = "网址:" & WebBrowser1.LocationName Label1.Caption = "url:" & WebBrowser1.LocationURL End Sub 该文章在 2013/11/14 16:58:03 编辑过 |
关键字查询
相关文章
正在查询... |