Search code examples
c#windowsformstimer

Get the value of a System.Windows.Forms.Timer?


Having a little problem with the windows form timer. Its a very basic question, but I've looked around and cannot seem to find the answer (I probably deserve a slap).

I need to be able to get the value of the timer, whether its elapsed time is greater than an interval of 500ms.

something like

Timer.Elapsed >= 500

Solution

  • Set the Interval property of the Timer to the number of milliseconds that you want to trigger on (500 in your example) and add an event handler for the Tick event.