Solved

Suppress "Runtime error" in CWebBrowser2

Posted on 2008-06-13
10
418 Views
Last Modified: 2013-11-20
I am using CWebBrowser2 to show HTML.
When I load HTML pages I get the following message:
"A Runtime Error has occurred.
Do you wish to Debug?

Line: 0
Error: Object expected"
I tried to suppress the erros using "SetSilent(TRUE)".
I does suppress the error, but it waits a lot of time for smething (minutes).

0
Comment
Question by:VapiSoft
  • 6
  • 2
10 Comments
 
LVL 40

Expert Comment

by:evilrix
Comment Utility
Try this: -

Go to your Internet Explorer web browser settings and disable script debugging.

Open "Internet Properties" and click on the "Advanced" tab. Look for the group called "Browsing" and tick the boxes "Disable script debugging (Internet Explorer)" and "Disable script debugging (other)". You might also want to untick "Display a notification about every script error".
0
 
LVL 40

Accepted Solution

by:
evilrix earned 500 total points
Comment Utility
Official documentation: http://msdn.microsoft.com/en-us/library/ms241741.aspx

How to: Enable Script Debugging in Internet Explorer

Before you can use Visual Studio to debug script running in Internet Explorer, you must enable script debugging in Internet Explorer. Script debugging in Internet Explorer is disabled by default.

To Enable Script Debugging in Internet Explorer
In Internet Explorer, choose Internet Options from the Tools menu.

In the Internet Options dialog box, click the Advanced tab.

On the Advanced tab, under Browsing, clear Disable Script Debugging.

Click OK.

0
 
LVL 40

Expert Comment

by:evilrix
Comment Utility
^^^ Obviously, do the opposite -- sorry, I forgot to point that out :)
0
 

Author Comment

by:VapiSoft
Comment Utility
Hi evilrix,

You did not understand the question.
I use the CWebBrowser2  in my program.
I am not interested in disabling it in the IE browser because I cannot (and don't want to) change the user's settings. I need something that disables the same thing in the CWebBrowser2  control.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 40

Expert Comment

by:evilrix
Comment Utility
>> You did not understand the question.
I assure you I did understand your question, completely!

>> I use the CWebBrowser2  in my program.
And this uses the Internet Settings to control its behavior

>> I am not interested in disabling it in the IE browser because I cannot (and don't want to) change the user's settings. I need something that disables the same thing in the CWebBrowser2  control.
This is a setting that is controlled by the users Internet Settings.

Did you try it?
0
 

Author Comment

by:VapiSoft
Comment Utility
Hi evilrix,

OK, I tried it (althought it is not what I want). I checked all 3 check-boxes (disable).
Now I receive a differnet error messages. It is a biiget dialog-box with the title (Internet Explorer Script Error). So I could suppress the error messages.
But even if I did work, I need to do it from the program (how?) and only for my control (so I do not change the usere's settings).
0
 
LVL 40

Expert Comment

by:evilrix
Comment Utility
I'm sorry, as far as I know this is the only way to control this. It's basically an ActiveX control that embeds IE in your application.
0
 
LVL 40

Expert Comment

by:evilrix
Comment Utility
I don't really see why this is being closed. The answer given is correct. The fact it's not the answer wanted doesn't make it any less correct. The ActiveX control is the IE rendering engine and its behavior is controlled via the normal Internet Settings, as already explained.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now