Hi,
Is it possible to create an instance of the Microsoft Web Browser ActiveX Control and place it on a form at runtime?
Are there no .NET components for web browsing?
Thanks!
Justin.
Printable View
Hi,
Is it possible to create an instance of the Microsoft Web Browser ActiveX Control and place it on a form at runtime?
Are there no .NET components for web browsing?
Thanks!
Justin.
No , there is no pure .NET Web Browser control . I think you can do it why not . :D
Any idea how you can do it? ;)
Isn't quite working out for me... tried adding a reference of the web browser dll and creating a new instance, but not sure how I go about placing this on a form...
Some one should create a pure .NET web browser component. That would be cool.
Right click on the toolbox , add and remove items , Com tab , scroll down to Microsoft Web Browser , OK . It's there . Drop it on your form , size it however you like .
Thanks pirate.. but I need to generate the control at Runtime, not using the IDE :)
bump!
After you add reference to Microsoft Web Browser , just paste this code to create an instance of it .
VB Code:
Public Sub CreateIt() Dim MyWBrowser As New AxSHDocVw.AxWebBrowser MyWBrowser.Enabled = True MyWBrowser.Location = New System.Drawing.Point(200, 200) MyWBrowser.Size = New System.Drawing.Size(300, 300) Me.Controls.Add(MyWBrowser) End Sub
Thats great, thanks mate!
I was trying to create an instance of SHDocVw instead of AxSHDocVw and so the control collection was having none of it.