How to Suppress / Disable Script Errors in WebBrowser Control (dev102.blogspot.com)

submitted by razamitrazamit(4545) 4 years, 1 month ago

I am currently writing an application that uses the WebBrowser control to perform operations on web pages. Unfortunately I stumbled upon a very annoying problem, sometimes an Internet explorer script error window pops up and stops all execution until you click the OK button. I've searched the web for hours and the same answer came up:

4 comments |category: |Views: 375

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by jessejesse(100) 4 years, 1 month ago 0

This is hilarious. The author readily admits that instead of glancing at the UI of his IDE or pressing the F1 key to see the members of the control, he instead "searched the web for hours". I've used this control in multiple applications and ScriptErrorsSuppressed is one of a small number of properties prominently displayed in the designer UI. Clicking it shows "Specifies whether the WebBrowser control shows script errors in dialog boxes" in the detail area. There aren't even that many members on this control, so hitting F1 should have ended Amit's "hours long" search in 1 minute. If I blog about how hard it is to see the "ScrollBarsEnabled" property can we kick that too?

Reply

posted by DaveMastersDaveMasters(0) 4 years, 1 month ago 0

-> jesse - it's not as simple as You think, the problem is when I change this property to true - IE script error window gets disabled but instead You get other window - something like this
[URL=http://img227.imageshack.us/my.php?image=windowbz6.png][IMG]http://img227.imageshack.us/img227/1577/windowbz6.th.png[/IMG][/URL]
in my case any workaround is good (except SendKeys.Send("%n") <- alt + n - works in 50%, need 100% ) so if You can help us do so and maybe someone help You when You will be in need. Regards.

Reply

posted by DaveMastersDaveMasters(0) 4 years, 1 month ago 0

ok, I found it ;)
in Internet Explorer menu Tools -> Internet Options ->Advanced ->check Disable Script Debugging (Others), and when You have ScriptErrorsSuppressed set to true it works fine (i made just a few tests)

Reply

posted by razamitrazamit(4545) 4 years, 1 month ago 0

i know you can find it in the Help, but you know, sometimes you overlook things... :)
as for you DaveMasters i am not getting this window when i disable this, i will try to check it out, thanks for the feed back happy holidays.

Reply

information Login or create an account to comment on this story