ndfweb.cn

vb6动态创建webbrowser


2019-09-05 07:33:16 (549)


vb6动态创建webbrowser

复制代码
Option Explicit Private WithEvents IE As VBControlExtender Private Sub Command1_Click() Dim IE Set IE = Me.Controls.Add("Shell.Explorer.2", "IE", Me)
    IE.Top = 0 IE.Left = 0 IE.Width = 5000 IE.Height = 5000 IE.Width = Me.ScaleWidth
    IE.Height = Me.ScaleHeight
    IE.Visible = 1 Dim WebBrowser Set WebBrowser = IE.Object
    WebBrowser.Silent = True WebBrowser.Navigate "http://www.baidu.com" End Sub Private Sub IE_ObjectEvent(Info As EventInfo)
    Debug.Print Info.Name End Sub Private Sub Command2_Click()
    Debug.Print IE.object.document.All(0).outerHTML          ‘获取真正的网页源码
End Sub
复制代码

 

了解更多请访问:http://www.ndfweb.cn/news-734.html
  NDF俱乐部
  国际域名注册
  建站咨询
合作伙伴:万网 | 新网 | 新网互联 NDF网站建设淘宝店 | 实用工具 | 外貿網站建設 | 联系我们
©2006-2020 NDF Corporation Sitemap - RSSRSS订阅