Using any kind of timer will give you more trouble than a thread — highly recommended.
Just to give you an idea: did you plan for situations when your timer event handler is not yet exited at the moment the next one if fired? There are many other traps. The worst one is
System.Windows.Forms.Timer
.
Create a thread infinitely running in a loop, using
System.Threading.Thread.Sleep
for the required amount of time. Your can trigger any UI operation based on this repetition, but remember, you cannot call anything on the UI directly from this non-UI thread. Instead, you should use the methods
Invoke
or
BegingInvoke
of
System.Threading.Dispatcher
or
System.Windows.Forms.Control
(absolutely does not matter what instance of control, it should be any control really participating in you UI, for example, your form). You will find very detailed explanation of how it works and further directions in my past Answers:
Control.Invoke() vs. Control.BeginInvoke()[
^],
Problem with Treeview Scanner And MD5[
^].
Just in case: my collection of references to my past Answers on threads, could be very useful:
How to get a keydown event to operate on a different thread in vb.net[
^].
—SA