Click here to Skip to main content
15,898,571 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I use a webbrowser control in my program and sometimes I navigate to a site where I get a message box with "ok" and "cencel" buttons.
Is there a way to ignore this message? or maybe somehow send a command to exit that message box.

Thanks!
Posted

Maybe your message is a script error.
Try setting property ScriptErrorsSuppressed to True

WebBrowser1.ScriptErrorsSuppressed = True
 
Share this answer
 
Expanding on 95ulisse answer, you can change the properties of the web browser object to also suppress script errors.

Look for the ScriptErrorsSuppressed option in the properties and change it from false to true.

This saves you from coding it yourself everytime :-)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900