d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > [c#] Waiting On A Function To Complete Tasks
Add Reply New Topic New Poll
Member
Posts: 1,075
Joined: Jun 27 2006
Gold: 926.00
Oct 18 2013 01:18am
Hi guys,

So in my program I have a button that calls a function. Let's call it GotoWebsite(). I also have a listbox that has all of the Url's that we'll be going to. Each site needs to fully load as there are various tasks that need to be completed at each page.

ie:
GotoWebsite(Url1) -> Navigate to Url1. Login to page. Post a message.
->Go to next Website and follow similar procedures.

I have tried foreach loops, Queue's, using DocumentCompleted at the final page of each Url, etc. Nothing I try seems to work.

The end result is always the same: The last item on the list is executed successfully; the rest were rushed through and basically skipped because it went too fast.

Anyone know a way I can make my GotoWebsite() function fully trigger with each Url in a listbox / string array / string list / whatever?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Oct 18 2013 06:12am
you need to show the code. if you wait for the stream to come back to read results, it should be fine.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll