|
-
Mar 4th, 2005, 03:51 AM
#1
Thread Starter
Hyperactive Member
How to stop a running thread?
Hi,
I have a VB.NET main form (mdi child) which will display data from various source in a TabPage control.
I've wrote a class contain a series of calls, and is invoked by a delegate's BeginInvoke method in the main form.
I found that when user close a mdi main form, the thread will continue to run until it finish. I know that if I can put some control in the worker thread to stop running when the calling form is closed, I can solve the problem.
But My problem is that how can the worker thread know the main mdi form is closed? Even if I set a variable for this, seems the thread can't access it.
since the main form is a mdi form, more than one instance may open concurrently, my worker thread should be able to distinguish its calling form is closed.......any help?
Thx!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|