Release resources in Forms
-
Hello, In my application (net2.0) I have a few threads. I want to stop the threads when the main form is closed. Now I'm not sure what I have to do. Normally I would implement a IDisposable interface. In the form exists this function already and it is not virtual. What is the best way to implement this? Which event I should use? Regards
-
Hello, In my application (net2.0) I have a few threads. I want to stop the threads when the main form is closed. Now I'm not sure what I have to do. Normally I would implement a IDisposable interface. In the form exists this function already and it is not virtual. What is the best way to implement this? Which event I should use? Regards
Hi When you create your threads, set the
IsBackground
property to true. When you close the app, the background threads are automatically terminated. ---------------------------- Be excellent to each other :) EasiReports[^] My free reporting component for WinForms. -
Hi When you create your threads, set the
IsBackground
property to true. When you close the app, the background threads are automatically terminated. ---------------------------- Be excellent to each other :) EasiReports[^] My free reporting component for WinForms.Thank you it was a very good hint!