Take a look at timers. There are 3 timers in the .NET framework. The ones
suitable in your case would be System.Windows.Forms.Timer
System.Timers.Timer. For the Forms timer, check your condition in the Tick
Event of the timer and for Timers timer, you can check your condition in the
Elapsed Event. Examples can be found in the MSDN documentation -
System.Windows.Forms.Timer:
http://msdn.microsoft.com/library/de...ClassTopic.asp
System.Timers.Timer:
http://msdn.microsoft.com/library/de...classtopic.asp
hope that helps..
Imran.
"Sameh Ahmed" <es******@hotmail.com> wrote in message
news:e9******************@TK2MSFTNGP10.phx.gbl...
hello there
need to create an application that checks for a condition every 5 minutes
and performs a certain action depending on whether the condition was met
or not.
what is the best way to do that?
using "system.Threading.Thread.Sleep (5000)" is the option I have in mind
now as I believe using a Do while loop will be quite resource intensive.
any ideas?
Regards
Sameh