?
Solved

Suppress "Runtime error" in CWebBrowser2

Posted on 2008-06-13
10
Medium Priority
?
426 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
10 Comments
 
LVL 40

Expert Comment

by:evilrix
ID: 21785186
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 2000 total points
ID: 21785196
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
ID: 21785201
^^^ Obviously, do the opposite -- sorry, I forgot to point that out :)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:VapiSoft
ID: 21786171
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
 
LVL 40

Expert Comment

by:evilrix
ID: 21786246
>> 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
ID: 21786299
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
ID: 21786354
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
ID: 21838281
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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

752 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