WebBrower Control: Close Script-Caused Dialogs Programmatically ?

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

I have a Windows Forms application that uses a WebBrowser object to
automatically visit a large number of web pages one at a time. The problem
is that some of the web pages throw up a dialog such as the print dialog (
from an onload='window.print()' ). This then can cause all sorts of
problems. Is there any way to know when a dialog has been to displayed and
then somehow close it?

Thx
 
John,

Almost not, although what webbrowser, the interop AxWebbrowser has more
possibilities to solve your problem than the now .Net class webbrowser
wrapper which is in Net 2.0.

Cor
 
Back
Top