[VB]如何使點擊新窗口仍然使用VB自己的窗口而不是IE瀏覽器
當前位置:點晴教程→知識管理交流
→『 技術文檔交流 』
在窗體中插入一個WebBrowser1,然后在代碼頁寫入: Dim StatusText As String Private Sub Form_Load() WebBrowser1.Navigate "End Sub 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 編輯過 |
關鍵字查詢
相關文章
正在查詢... |