View Single Post
  #8 (permalink)  
Old 05-04-2008, 09:30 AM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,436
Last Blog:
Web slideshow in JavaS...
Credits: 1,322
Rep Power: 61
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: using timer to elapse time before method?

That's OK. I don't think the Thread.Sleep() method is the best choice, though - this method suspends the thread on which the program is run on. Therefore, during the 4 seconds the window completely freezes up, so the user cannot access it. A timer executes the time on a separate thread, so the user interface does not freeze up.
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."
Mr. Xav | Website | Forums | Blog
Reply With Quote