469,573 Members | 1,681 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

Detecting window.close in WebBrowser control

I have a situation where i have a form that contains a
webbrowser control. With this I was able to implement an
application that can browse websites. One particular
website i visited opens up another web page in a new
window and then closes it. I was able to control this
action by detecting the 'NewWindow' event and opening the
webpage in my own application.

Now the problem i have come across is that when the
webpage that was opened in a new window exits (i think it
is the result of a scripted 'window.close') the
webbrowser control that was displaying the webpage closes
and i am left with an empty form.

What I would like to do is detect the webbrowser control
closing and close the form it is contained in. The
WebBrowser control ignores the 'Quit' and 'OnQuit' events
which i thought could have been used to do this. The only
event i have been able to detect is the 'WindowClosing'
event, though this fires before the webbrowser control
actually closes. Has anyone come across this problem or
am i not using the webbrowser control properly? I would
greatly appreciate any feedback.
Nov 20 '05 #1
1 5233
I also have this problem and I'm monitoring a few topics for replies.
May 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by bill ramsay | last post: by
1 post views Thread by Nico Grubert | last post: by
1 post views Thread by nagar | last post: by
reply views Thread by endy_tj | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.