|
-
Mar 10th, 2002, 01:47 AM
#1
Thread Starter
Frenzied Member
there is an even for the web browser control that gets called whenever a new window gets open... what you can do is have it load the page in a new instance of form1... though i don't have access to vb on this machine so i can't give u code
Government is another way to say better…than…you.
It’s like ice but no pick, a murder charge that won’t stick,
it’s like a whole other world where you can smell the food,
but you can’t touch the silverware.
Huh, what luck. Fascism you can vote for.
Humph, isn’t that sweet?
And we’re all gonna die some day, because that’s the American way
-Stone Sour
-
Mar 10th, 2002, 06:39 PM
#2
PowerPoster
Yep, I'm using the code;
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim F As Form
Set F = frmBrowser
F.Show
End Sub
Is there anything wrong with that??
I have the same code in my Menu, for opening a New Window, but as I said above, in the WebBrowser its opening in IE
-
Mar 10th, 2002, 06:45 PM
#3
Originally posted by Pc_Madness
Yep, I'm using the code;
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim F As Form
Set F = frmBrowser
F.Show
End Sub
You've almost got it...
VB Code:
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim F As new frmBrowser
set ppDisp = F.WebBrowser1
F.Show
End Sub
Try that.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 10th, 2002, 06:51 PM
#4
PowerPoster
Yep it works. Thanks a million
Now other question I have is
The other one is, I've set the shortcut "New Window" in my Menu to Ctrl+N (the same as IE's...) when people use it, it opens another window in IE
Whats causing this??
-
Mar 10th, 2002, 06:57 PM
#5
Just navigate to the same location with a blank target like this...
VB Code:
Private Sub mnuFileNew_Click()
WebBrowser1.Navigate WebBrowser1.Document.location.href, , "_blank"
End Sub
It should fire the NewWindow2 event which will open a new instance of your browser.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 10th, 2002, 07:04 PM
#6
PowerPoster
Nope it didn't work.
Ok so, when I click on New Window (FileNewWin) , it will open it normally, which is great, but I've given it the shortcut Ctrl + N, the same as Internet Explorer's so that people can have a similar feel. But instead it opens in IE window.
I just tried changing the Shortcut to Ctrl + o which doesn't work, but CTRL + U does.
-
Mar 11th, 2002, 12:03 AM
#7
PowerPoster
Just trying to get this back at the top of the forums.......
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
|