Problem shutting windows when thread running!!!
-
Hi, I have a problem in shutting windows down when my thread is running. I am able to shut windows down after I stopped my thread. I am using VS 2003 C#, and this is happening in Windows application. What could be the problem? Could anyone hlep get rid of this? Thanks in advance. Muthu.
-
Hi, I have a problem in shutting windows down when my thread is running. I am able to shut windows down after I stopped my thread. I am using VS 2003 C#, and this is happening in Windows application. What could be the problem? Could anyone hlep get rid of this? Thanks in advance. Muthu.
Sure! As long as your thread is running, windows will keep waiting for it to end, or it will give you the choice to forcefully "end task". Another more graceful way is to set
MyThread.IsBackground = true
. This way it will automatically end when all other foreground threads of your program end.Regards:rose:
-
Sure! As long as your thread is running, windows will keep waiting for it to end, or it will give you the choice to forcefully "end task". Another more graceful way is to set
MyThread.IsBackground = true
. This way it will automatically end when all other foreground threads of your program end.Regards:rose:
-
Thanks. MyThread is a Background thread. i.e. MyThread.IsBackground = true; But still it prevents me from shutting down windows. Muthu.
That's really wiered!! Are you sure there are no other foreground threads active beside that one? Also does your thread keep running after your closed your program normally?
Regards:rose: