|
-
Sep 22nd, 2003, 04:49 PM
#1
Thread Starter
Addicted Member
Create ActiveX at Runtime [Resolved]
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.
Last edited by Justy; Sep 23rd, 2003 at 06:22 AM.
-
Sep 22nd, 2003, 04:54 PM
#2
Sleep mode
No , there is no pure .NET Web Browser control . I think you can do it why not .
-
Sep 22nd, 2003, 04:58 PM
#3
Thread Starter
Addicted Member
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...
-
Sep 22nd, 2003, 05:03 PM
#4
Hyperactive Member
Some one should create a pure .NET web browser component. That would be cool.
-
Sep 22nd, 2003, 05:42 PM
#5
Sleep mode
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 .
-
Sep 23rd, 2003, 03:27 AM
#6
Thread Starter
Addicted Member
Thanks pirate.. but I need to generate the control at Runtime, not using the IDE
-
Sep 23rd, 2003, 05:33 AM
#7
Thread Starter
Addicted Member
-
Sep 23rd, 2003, 06:13 AM
#8
Sleep mode
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
-
Sep 23rd, 2003, 06:21 AM
#9
Thread Starter
Addicted Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|