首页 > 代码库 > vb6动态创建webbrowser

vb6动态创建webbrowser

Option ExplicitPrivate WithEvents IE As VBControlExtenderPrivate 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 SubPrivate Sub IE_ObjectEvent(Info As EventInfo)    Debug.Print Info.NameEnd Sub