Click to See Complete Forum and Search --> : MS Browser control
thinh
Apr 21st, 2000, 07:14 PM
In the MS internet control, with the newwindow2 event, it will popup an IE window. But i don't want the IE window, i want a custom window that i created at design time pop out with a MS internet control in it and navigate the url...
how can i do that?
Dubi
Apr 24th, 2000, 01:09 AM
Hey ThinH. This should solve your problem.
You need to SET the ppDisp in the NewWindow2 Event to your new form's webBrowser object. Should go like this:
<Code>
Public Sub NewWindow2(ppDisp as Object, Cancel as Boolean)
Set ppDisp = Form2.WebBrowser1.Object
Form2.Show
End Sub
</Code>
If that doesnt work or you need a second instance of your original browser...let me know. bvozza@okid.com
lata
I have an even better code:
Private Sub webbrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim F As New observe
F.Show
Set ppDisp = F.webbrowser1.object
End Sub
This will open a whole new window using your program and take you to the link that you requested to open a new window with.
shaunmccallig
Feb 22nd, 2001, 08:42 AM
As for this post...Long time no see!
I've been searching for this code recently and was pretty happy to find it in the Archives of this forum.
My VB5 says "User defined type not defined" to the attempt to create a New "observe".
Am I missing something (VB 6, perhaps)?
Matthew? Anyone?
M Thanx,
Shaun.
shaunmccallig
Feb 22nd, 2001, 09:01 AM
"observe" was (of course) the name of the form.
I just figured that out!
Ahem...
Gentle please, I'm just a beginner...
(Code works great now though! Love this forum!)
Shaun.
Eh, sorry for that.
observe was the name of my form when I created my lil webbrowser which was never completed.
observe is same as Form1 or whatever your form is.
Truly sorry about that, guess I forgot to change it when I took it from my WebBrowser project.
..as for the thread: wow, this is old!
Hehe, I didn't even have a signature yet ;).
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.