The short form of this question: When, if ever, is it appropriate to use the Forms.Timer in a multithreaded WinForms application?
More specifically, I am architecting an application that uses multiple System.Threading.Timers to launch processes asynchronously, check queues containing the results of those asynchronous processes, and update the statistics to be shown by the application’s main form.
In an application like that, is it appropriate to use a Forms.Timer to actually check the application statistics and draw them to the main form or would that just throw a wrench into the application’s smooth running?
Forms.Timerregisters the timer to send a message when the timer goes off. The event raised is treated like a GUI event.System.Threading.Timeruses a thread blocking approach. Basically, you should useForms.Timerfor your GUI oriented timers (to add some effects to the user interface) andThreading.Timerfor scheduling tasks and other things.