Solved

controling webbrowser control  error messages

Posted on 1998-06-03
8
213 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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
 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

770 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