Passing arguments from one webbrowser control to another

quantum

New member
Joined
Dec 27, 2007
Messages
2
Programming Experience
5-10
Well, I believe the subject says it all really... How can I make one webbrowser component to be a 'parent' (or child, if you reverse it) of the other webbrowser control? Here is what I am talking about - if you try to sign up with Facebook using webbrowser component, and it opens a popup window with your profile details (using another instance of webbrowser control), how to get data back to the component that originaly invoked the second webbrowser component? I'm really stuck with this one here, so help is more than appreciated!
Thanks in advance!
 
Solved

One needs to extend webbrowser control and add RegisterAsBrowser property, plus newwindow2 event with a reference to IDispatch interface. Then simply set a proper ppDisp in the NewWindow2 event to point out to a right context, assign the originating component to be the parent of the newly created one, and set RegisterAsBrowser property of the new component to True. Voila - the session persists between the two!
Quite simple :)
 
Back
Top