Theos PowerBasic Museum 2017

Archive => Archived Posts => Topic started by: Paul Emerson on July 04, 2010, 07:47:13 PM

Title: WebBrowser Control Error Suppression?
Post by: Paul Emerson on July 04, 2010, 07:47:13 PM
Hi,

I'm using the WebBrowser control but I cant work out how to suppress script errors, "An error has occured in the script on this page" etc.
I think I need to catch %OLECMDID_SHOWSCRIPTERROR somehow and return %TRUE to say I've handled it but I'm not exactly sure how to achieve this.
Any ideas?

PE
Title: Re: WebBrowser Control Error Suppression?
Post by: José Roca on July 04, 2010, 10:38:17 PM
 
Try setting the Silent property of the IWebBrowser2 interface to true. You also have to turn off the Scripting Debugger in Internet Explorer. To turn off the Scripting Debugger in Internet Explorer, on the Tools menu, click Internet Options. On the Advanced tab, select the Disable script debugging check box, and then click OK.
Title: Re: WebBrowser Control Error Suppression?
Post by: Paul Emerson on July 04, 2010, 11:28:57 PM
Thank you very much, that worked perfectly!