|
-
Sep 19th, 2005, 10:21 AM
#1
Thread Starter
Fanatic Member
VB6 WebBrowser Object and the Open In New Window Issue [Cracked It Anyway]
I have a custom web browser that is nothing special jsut the browser object and a few basic controls (stop, refresh, back etc). It is used as part of a bigger project and works very well for my needs in all respect but one.
Some links open in a new window and IE6 is used... that kinda sucks as it undoes the whole reason for using my program.
How can I best deal with these links?
Ideally I'd like to find a way to open them in a new form within my project. I use a MDI and the "browser" is an MDI Child.
I've Googled on the subject but so far without success.
Last edited by Matt_T_hat; Sep 19th, 2005 at 11:00 AM.
Reason: RESOLVED
-
Sep 19th, 2005, 10:51 AM
#2
Thread Starter
Fanatic Member
Re: VB6 WebBrowser Object and the Open In New Window Issue
I've found this http://msdn.microsoft.com/workshop/b...newwindow2.asp which seems to refer to NewWindow2 but how do I use it?
-
Sep 19th, 2005, 10:59 AM
#3
Thread Starter
Fanatic Member
Solved It Myself!
VB Code:
Private Sub WebBrowser1_NewWindow2(ppDisp As Object,
Cancel As Boolean)
Dim frmWB As Form1
Set frmWB = New Form1
frmWB.WebBrowser1.RegisterAsBrowser = TRUE
Set ppDisp = frmWB.WebBrowser1.Object
frmWB.Visible = True
End Sub
http://support.microsoft.com/kb/q184876/
I guessed (correctly as it turns out) that WebBrowser1 should be replaced with whatever you called your browser object and form1 as whatever your form is called that holds 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
|