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
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。