Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I'm orking on a simulation project, and I need to fill a Listox using a timer to do it, I'm simulating a phone central with 25 lines and many users, and I need to simulate users making a 'lane' to get access to telephone line and dial. For this, I need to put them in 'lane' (my lane will be the Listbox) every certain time, but I need to use the timer and I don't know how. I have consulted http://www.msdn.com, but it has an example for use the timer in console and NOT in Windows Form (and I'm not so expert with Visual Basic .NET), so I need an example of encolating people in my listbox using the timer.
tHe pHrEaKy
  • Leaders
Posted

Just add a timer component to your form. Set the interval property (in milliseconds) and either set the enabled property (in the property grid) to true, or call the .Start method (in code). Double click the timer in the designer and it will pop up the code with a handler template for the Tick event.

   Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

   End Sub

Just put the code that should be executed every-so-often inside that sub.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...