Boblysan

Boblysan

  • NA
  • 66
  • 0

System.Timers????

Apr 8 2004 10:36 PM
This can't be that difficult.. I want to create and start a timer.. Once 2 minutes has elapsed, I want to call on a specific method and disable the timer... Please assist... System.Timers.Timer tmrNewTimer = new System.Timers.Timer(); tmrNewTimer.Interval = 10000 tmrNewTimer.Enabled = true; tmrNewTimer.Elapsed += new ElapsedEventHandler(DoThisMethod); // code // code.. public DoThisMethod() { // code.. } All I am trying to do is have my application stop at the timer.. Wait 10 seconds.. execute the code in my DoThis method .. and disable the timer.. After 3 weeks, I still am unsuccessful. If ANYONE could help me out with this, it would be very much appreciated. and PLEASE don't just give me a link to MSDN.. Thank you,

Answers (2)