1 Replies - 2467 Views - Last Post: 03 September 2009 - 11:47 PM Rate Topic: -----

#1 iNutR   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 53
  • Joined: 09-June 09

Foreach loops and timers and webbrowser

Posted 02 September 2009 - 02:25 AM

ok well i have a foreach loop for all the items in a listview.
but i want to use a timer with this as well.

this is what i want to do:
i have a webpage.
i want to fill this webpage with data from the listview.
i then want to submit this data, so it shows a new page in the web browser.
i then want it to go back to the original page, and then start the next item in the foreach loop
however i cant seem to get variables to pass through the timer, so im thinking maybe a webBrowser.DocumentCompleted method.
but im not too sure on how to do this.

this is pretty much what i want to do, but it doesnt work

foreach (ListViewItem item in lvAccounts.Items)
{
webBrowser.Navigate(URL);
timer1.Start(item);
}

timer1_tick(object sender, EventArgs e, ListViewItem item)
{
timer1.Stop();
// Do Method
}


but the better alternative would be to have a document completed thingo, because then it will start when it is completed, and not when the timer thinks it will be completed.

please help me :)

Is This A Good Question/Topic? 0
  • +

Replies To: Foreach loops and timers and webbrowser

#2 iNutR   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 53
  • Joined: 09-June 09

Re: Foreach loops and timers and webbrowser

Posted 03 September 2009 - 11:47 PM

anyone?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1