[VB]如何使點(diǎn)擊新窗口仍然使用VB自己的窗口而不是IE瀏覽器
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
在窗體中插入一個(gè)WebBrowser1,然后在代碼頁(yè)寫入: 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 = "網(wǎng)址:" & WebBrowser1.LocationName Label1.Caption = "url:" & WebBrowser1.LocationURL End Sub 該文章在 2013/11/14 16:58:03 編輯過(guò) |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |