PC Review


Reply
Thread Tools Rate Thread

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

 
 
trint
Guest
Posts: n/a
 
      23rd Sep 2005
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

 
Reply With Quote
 
 
 
 
Pete Davis
Guest
Posts: n/a
 
      23rd Sep 2005
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


"trint" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      23rd Sep 2005
Make your non UI threads background threads (see Thread.IsBackgound
property), these are automatically teared down by the CLR when executing
ApplicationExit.

Willy.

"trint" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to stop a running program? DH Windows XP General 6 8th Jun 2007 03:58 PM
Stop a program from running =?Utf-8?B?RGluZ2FsaW5n?= Windows XP Help 2 23rd Aug 2006 07:33 PM
Stop program running =?Utf-8?B?VGFuMw==?= Windows XP Help 1 26th Mar 2004 01:55 AM
Stop a VB program from running Soterro Microsoft Excel Programming 4 5th Dec 2003 07:25 PM
stop program running mgmccorvy@msn.com Microsoft Windows 2000 1 4th Dec 2003 12:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:28 PM.