Saurabh,
When your app closes, you should send a signal to the thread to indicate
that it should stop its work, and close down gracefully (whether through a
variable that is constantly checked, or some other mechanism).
Only then, should your app shut down. Forcefully killing the thread is
a bad idea.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard. caspershouse.co m
"Saurabh Sharma" <sa***********@ yahoo.com> wrote in message
news:Or******** ******@TK2MSFTN GP12.phx.gbl...
Hi
I have made a Windows Form and in it few calculations and processos are
running. When i close the form the process continues to run until that
particular function in finished. I cant use Environment.Exi t 0 as they and
in the subform and i want to load the main form when i close that.
Please tell me how to stop all the functions once a loop is closed
Regards
Saurabh Sharma