Can't stop program running in new thread...help

  • Thread starter Thread starter trint
  • Start date Start date
T

trint

Ok,
I click on 'exit' and have it calling (function is started in new
thread):

this.m_notifyicon.Dispose();
Application.Exit();
or
this.Close();

And TaskManager shows it still running!
Any help is appreciated.
Thanks,
Trint
 
Sounds like the separate thread is still running. You'll need to stop that
thread first. The ugly way would be a simple myThread.Abort(), but you
probably want to implement a cleaner shutdown mechanism to signal the thread
that it should stop running, perhaps through some static member.

Pete
 
Make your non UI threads background threads (see Thread.IsBackgound
property), these are automatically teared down by the CLR when executing
ApplicationExit.

Willy.
 
Back
Top