|
-
Aug 17th, 2006, 05:30 AM
#1
Thread Starter
Addicted Member
Timer explanation
I have build a windows service, I have a timer and have set it's interval to every 10 secs for now, on the on start event I have set the timer to timer.start, so will this then activate the script every 10 seconds? or do I need to set anything else?
There is no inverval event in 2005 just timer1.tick, do I need to put anything in here? apart from my code of course.
Thanks
Last edited by soluga; Aug 17th, 2006 at 08:14 AM.
-
Aug 17th, 2006, 05:35 AM
#2
Re: Timer explanation
There are several different timers. The Windows.Forms.Timer has a Tick event while the Timers.Timer has an elapsed event, but they both have an Interval property. You set the Interval and the relevant event is raised each time that interval expires. You have to handle the Tick or Elapsed event and then put the code you wwant executed in the event handler.
http://msdn.microsoft.com/msdnmag/is...T/default.aspx
-
Aug 17th, 2006, 08:13 AM
#3
Thread Starter
Addicted Member
Re: Timer explanation
Thanks, I changed to system.timer and works fine now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|