Solved

controling webbrowser control  error messages

Posted on 1998-06-03
8
210 Views
Last Modified: 2010-05-03
When the vb5's webbrowser control generates error messages,
such as err 401 url not found, I want to either disable them or intercept them and force an 'ok'  click  or close then automatically . How can this be done. These messages are modal and lock all other processes within my app.
Please post comment only, unless you have true solution
including code/example as I am new to this.  
thanks in advance for your effort. fred.

0
Comment
Question by:fred12
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 2

Expert Comment

by:ndnet
ID: 1462454
Just put the following line of code at the beginning of each Sub

On Error Resume Next


This will skip the error messages.
0
 

Author Comment

by:fred12
ID: 1462455
ndnet sorry, this does not prevent error messages generated within the webbrowser control, thanks anyway.
0
 
LVL 4

Expert Comment

by:zsi
ID: 1462456
Sorry, Fred, but I do not think that you can.  The Web Browser control is simply a wrapper around Internet Explorer's OLE model.  The OCX will not allow you to supress error messages.

The only way that you might be able to do it is by subclassing IE, but I do not think that it would be worth your time.

If you need more control over the browser, you might want to consider a third-party control that will allow you to do this.
0
 
LVL 1

Expert Comment

by:sirigere
ID: 1462457
I think this can help you out

on error goto ErrLabel

ErrLabel:
msgbox err.number & err.description,vbOkOnly

0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 6

Accepted Solution

by:
clifABB earned 100 total points
ID: 1462458
Use this code:
WebBrowser1.Silent = True

You must do this in code as this property is Read/Write in Run-time only.

To recieve errors, such as 404, you might use the Text parameter of the TitleChange event
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1462459
zsi:
Silent does allow you to supress error messages.

sirigere:
WebBrowser does not produce trappable errors.
0
 
LVL 4

Expert Comment

by:zsi
ID: 1462460
clif.

That must have been introduced in IE4, which I am not running.  I guess it is time to upgrade...  :)
0
 

Author Comment

by:fred12
ID: 1462461
excellent cliffabb
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 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

19 Experts available now in Live!

Get 1:1 Help Now