thread completion notification

  • Thread starter Thread starter Bernie Yaeger
  • Start date Start date
B

Bernie Yaeger

How can I know, inside an mdi app, that a particular thread is finished
processing? I can't, of course, check it with every form that may open
(there are more than 100) and the form that opened it did so in its closing
event, so it is no longer open.

Thanks for any help.

Bernie Yaeger
 
* "Bernie Yaeger said:
How can I know, inside an mdi app, that a particular thread is finished
processing? I can't, of course, check it with every form that may open
(there are more than 100) and the form that opened it did so in its closing
event, so it is no longer open.

You could create a class that starts the thread and has a method that is
invoked by the thread when it finishes. Then this class can raise an
event or provide a property that indicates that the thread is finished.
 
If you created the thread then do a JOIN on it prior to the form closing
(but after hiding the form). That will keep the form from being
collected and you will have a way to control it.

However, I think that Herfired's method is cleaner.

HTH
David
 
Hi Dave,

Thanks for your advice; Herfried's approach did work fine, so I did not test
yours, but tx again.

Bernie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top