WebBrowser Control - "Pause" problem

Hi,

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

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.
LVL 2
englishmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Da_WeaselSenior Software AnalystCommented:
The FileDownload event won't fire while you are in that loop?
0
englishmanAuthor Commented:
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.
Cheers.
0
SpideyModCommented:
PAQ'd and all 75 points refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.