473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Looping question

I am using AxSHDocVw.AxWebBrowser in my WinForms app.
I have an array of URLs as string
I use the following loop to navigate to these URLs and then in
DocumentComplete Event of AxWebBrowser I proccess the opened page.
I do this by the fallowing loop.

Dim Browser as New AxSHDocVw.AxWebBrowser
Dim i as Integer
for i = 0 to arrURLs.GetUpperbound(0)
Browser.Navigate(arrURLs(i))
next

The problem is that it only executes for the last element in the array.
My questions are:
1. How to make the next loop iteration to wait for the browser to load the
page, them the event hadler to do it's job and after then to execute the
next loop?
2. Why it only goes to the Last element in the array? (I guess, because it
is the last url passed to the browser, others just goes too fast)
TIA
Nov 21 '05 #1
1 843

"Nikolay Petrov" <jo**************@mail.bg> wrote
I am using AxSHDocVw.AxWebBrowser in my WinForms app.
I have an array of URLs as string
I use the following loop to navigate to these URLs and then in
DocumentComplete Event of AxWebBrowser I proccess the opened page.
I do this by the fallowing loop.

Dim Browser as New AxSHDocVw.AxWebBrowser
Dim i as Integer
for i = 0 to arrURLs.GetUpperbound(0)
Browser.Navigate(arrURLs(i))
next

The problem is that it only executes for the last element in the array.
My questions are:
1. How to make the next loop iteration to wait for the browser to load the
page, them the event hadler to do it's job and after then to execute the
next loop?
2. Why it only goes to the Last element in the array? (I guess, because it
is the last url passed to the browser, others just goes too fast)


Too fast, correct.

So the last line of your DocumentComplete event should be a call to
load up the next page in a list....

LFS
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Colin Steadman | last post by:
I've create a simple survey using ASP. Its finished and works, but one aspect of my coding is annoying me and I cant figure out a better way of doing it. Basically the questions are stored in...
0
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? I’m trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box...
0
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? I’m trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box...
13
by: JayCallas | last post by:
I know this question has been asked. And the usual answer is don't use cursors or any other looping method. Instead, try to find a solution that uses set-based queries. But this brings up...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
6
by: Luke - eat.lemons | last post by:
Hi, Im pretty new to asp so all light on this question would be great. Basically i need to test to see what value is set (where to retrieve the data from) so ive done it like this: If...
3
by: Luke - eat.lemons | last post by:
Sorry for the post in this NG but im short on time to get this working and i haven't seem to of got a response anywhere else. Im pretty new to asp so all light on this question would be great. ...
2
by: Davaa | last post by:
Dear all, I am a student making a MS Form application in C++. I would ask a question about "Timer". Sample code which I am developing is below. private: System::Void...
3
by: chiku1523 | last post by:
Hi, Please find the following code. In function setAnswers, I am looping with each question. I have inner loop, which is looping for each answers of the questions. If any of the answer for question...
1
by: Robocop | last post by:
Having just started using C again after some years off, i've been stumped by a problem i think someone more experienced could probably solve pretty easily. I have these 4 objects (vectors), and i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.