WebBrowser Control - "Pause" problem

Posted on 2003-02-25
Medium Priority
Last Modified: 2008-02-01

I'm using the webbrowser control to hit a number of addresses defined in the code.

Now, when I get a 403 error (when the page isn't there), the control moves on to try the next address.
When the file is there, the control attempts to download the file and I then capture this FileDownload event and prevent the "Save File as..." dialogue box. I can then, for example, note this address for future reference and move on to the next URL attempt.

The trouble is ...

The webbrowser control doesn't bother waiting for a result before looping through all the addresses.
So I deal with this with:

Do While WebBrowser.ReadyState <> READYSTATE_COMPLETE

But in this case I'm unable to capture the FileDownload event and prevent that "Save File as..." dialogue box.

I'm sure I'm getting my event orders mangled somewhere.

All suggestions more than welcome of course.

Cheers all.
Question by:englishman
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

Expert Comment

ID: 8021585
The FileDownload event won't fire while you are in that loop?

Author Comment

ID: 8144555
Hi DW,
It was resolved when I realised that an error ("Secure and NonSecure Items"), was being invoked by the web address, not a 403.
Oh well.

I'm requesting the deletion of this question.

Accepted Solution

SpideyMod earned 0 total points
ID: 8144571
PAQ'd and all 75 points refunded.

Community Support Moderator @Experts Exchange

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, 4 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