4 Replies - 3045 Views - Last Post: 09 March 2010 - 12:05 PM Rate Topic: -----

#1 Guest_nfcs2007*


Reputation:

Timer to display list box

Posted 08 March 2010 - 05:31 AM

Hey guys

if i want to let my list box keep displaying item by set the timer to it , what option can i have?


 
timer = new Timer();
timer.Interval = (int)timerUpdate;
timer.Tick += new EventHandler(timer_Tick);
timer.Start();



this is my timer setting anything wrong?
Is This A Good Question/Topic? 0

Replies To: Timer to display list box

#2 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: Timer to display list box

Posted 08 March 2010 - 05:47 AM

Timer looks right, but I don't understand the question. Could you re-word or expand it please?
Was This Post Helpful? 0
  • +
  • -

#3 Guest_Guest*


Reputation:

Re: Timer to display list box

Posted 08 March 2010 - 05:52 AM

i am trying to display the network speed on list box , and the user can select the interval and the list box keeep display the speed, so if the user select 2 mins then the lisbox refresh every 2 mins etc
Was This Post Helpful? 0

#4 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: Timer to display list box

Posted 08 March 2010 - 05:56 AM

Just have your Event Handler update the output in the listbox with the new Network Speed. I am not sure for this use a list box is the best choice though. Wouldn't a label or text box be better suited?
Was This Post Helpful? 1
  • +
  • -

#5 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 773
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: Timer to display list box

Posted 09 March 2010 - 12:05 PM

To obtain the download/upload speed for your connection, take a look at the source code provided in this article:
http://www.codeproje...rkmonitorl.aspx

All you have to do is implment it inside the Timer_Tick event handler.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1