Luc
2009-12-30 09:17:01 UTC
I've got a combination of a windows forms app hosting a webbrowser control,
and a web application that's displayed in that webbrowser control.
At a certain point, the web application registers a startup script that
calls window.close(). The webbrowser control is supposed to terminate the
application at that moment.
When this is executed, I've got two problems (the first isn't that serious,
the second is the show stopper):
* The webbrowser control pops up the dialog asking if I want to close the
browser, just like IE does. I'm fine with IE doing that, but can it be
avoided for a webbrowser control?
* I find no way to detect this in the forms application. Apart from
popping up that dialog, the webbrowser control doesn't seem to do anything
with it, no matter what action the user chooses.
and a web application that's displayed in that webbrowser control.
At a certain point, the web application registers a startup script that
calls window.close(). The webbrowser control is supposed to terminate the
application at that moment.
When this is executed, I've got two problems (the first isn't that serious,
the second is the show stopper):
* The webbrowser control pops up the dialog asking if I want to close the
browser, just like IE does. I'm fine with IE doing that, but can it be
avoided for a webbrowser control?
* I find no way to detect this in the forms application. Apart from
popping up that dialog, the webbrowser control doesn't seem to do anything
with it, no matter what action the user chooses.