Thanks!
> I have a form (Form1) which I'm trying to add instances of a webbrowser
> dynamically (during runtime). Is this possible, or do I have to create them
> at design time?
You can use the Controls.Add method:
Doug.
Thanks Again!
Eric
"Douglas Marquardt" <no_...@dummy.com> wrote in message
news:esw1$KYECHA.2164@tkmsftngp02...
I dropped a Webbrowser control on the form, opened the form in notepad..
which gave me "SHDocVwCtl.WebBrowser"
Entered:
Dim o As SHDocVwCtl.WebBrowser
Set o = Controls.Add("SHDocVwCtl.WebBrowser", "o")
when I ran it, VB told me that the correct name for that is
"Shell.Explorer.2"
so... after making the change, this works.
'============
Private Sub Form_Load()
Dim o As SHDocVwCtl.WebBrowser
Set o = Controls.Add("Shell.Explorer.2", "o")
With o
.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
.Visible = True
.Navigate2 "http://www.vbsight.com"
End With
End Sub
'============
--
Ken Halter
MS-MVP-VB
http://www.vbsight.com
http://www.vbsight.com/MultiColumn.htm
Please keep it in the groups..