施耐德电表:VB中WebBrowser控件使用方法总结2
来源:百度文库 编辑:偶看新闻 时间:2024/04/28 20:42:28
6、我要动态加载和删除WebBrowser控件应该怎么做?
PrivateSub Command1_Click()
Form1.Controls.Add "shell.explorer.2", "NewWeb", Form1
With Form1!NewWeb
.Visible = True
.Width = 10000
.Height = 10000
.Left = 0
.Top = 0
.Navigate2 "www.csdn.net"
End With
EndSub
PrivateSub Command2_Click()
Controls.Remove Form1!newweb
EndSub
Form1.Controls.Add"shell.explorer.2", newweb(newweb.Count), Form1
With Form1!newweb(newweb.Count)
.Visible = True
.Width = 1000
.Height = 1000
.Left = newweb(newweb.Count - 1).Left + newweb(newweb.Count - 1).Width
.Top = 0
'.Navigate2 "www.csdn.net"
End With
为什么他说我
Form1.Controls.Add"shell.explorer.2", newweb(newweb.Count), Form1
这一行错误13类型不匹配?
ps:我在form中已经有了一个newweb(0)控件
先为一个WebBrowser
Dimi As Integer
PrivateSub AddWeb_Click()
For i = 1 To 10
Load NewWeb(i)
NewWeb(i).Top = i * 100
NewWeb(i).Left = i * 100
NewWeb(i).Visible = True
Next i
EndSub
PrivateSub DelWeb_Click()
For i = 1 To 10
Private
End
Private
End
Form1.Controls.Add
为什么他说我
Form1.Controls.Add
这一行错误13
ps:我在form中已经有了一个newweb(0)控件
先为一个WebBrowser
Dim
Private
End
Private