Hi,
I've tried many different ways to figure this out, but I simply cannot! Perhaps someone else can...
I am trying to use the NewWindow2 event of the WebBrowser Control in Visual Basic 6. In the event, there is a "ppDisp as Object" parameter which I cannot figure out how to use. I want it to create another form from my program when a NewWindow2 event is executed, instead of an Internet Explorer window appearing. I looked through Microsoft's site and found this, but it didn't help me. Perhaps it will help you?
-----
The NewWindow2 event is fired when a window is about to be created, such as during the following actions:
The user clicks a link while pressing the SHIFT key.
The user right-clicks a link and selects Open In New Window.
The user selects New Window from the File menu.
There is a targeted navigation to a frame name that does not yet exist.
Your browser application can also trigger this event by calling the Navigate or Navigate2 method with the navOpenInNewWindow flag. The WebBrowser control has an opportunity to handle the new window creation itself. If it does not, a top-level Internet Explorer window is created as a separate (nonhosted) process.
The application processing this notification can respond in one of three ways:
Create a new, hidden, nonnavigated WebBrowser or InternetExplorer object that is returned in ppDisp. Upon return from this event, the object that fired this event will then configure and navigate (including a BeforeNavigate2 event) the new object to the target location.
Cancel the navigation by setting Cancel to True.
Do nothing and do not set ppDisp to any value. This will cause the object that fired the event to create a new InternetExplorer object to handle the navigation.
-----
I know how to prevent anything from happening, but I want another form from my program to appear instead of an Internet Explorer window.
Thanks for your help!
-Burbble