Solved

how to tell when thread has finished vb.net

Posted on 2011-03-25
5
442 Views
Last Modified: 2012-05-11
Hi

I need to be able to tell when a thread has finished so I can run some procedures. I do not want to sit and wait for it so is there an event or something that is raised?

Thanks Nick Steele
0
Comment
Question by:nsteele84
  • 2
  • 2
5 Comments
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
There are many ways to do it...the "best" approach is highly dependent upon the type of application and how the "flow" of what you're doing fits into the "big picture".

Can you give more details on the type of app, version of VB, what is being done, and when "it" is firing off?
0
 

Author Comment

by:nsteele84
Comment Utility
The application is an FTP upload. I use the thread to upload the files but when it is finished I need to update a tree view which is in the main thread.
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
Ok...so we're talking a WinForms app then?  What version VB?
0
 
LVL 17

Accepted Solution

by:
nepaluz earned 500 total points
Comment Utility
use the backgroundworker to run your threads and handle the OnComplete event. e.g have a messagebox or update a label with your chosen notification
0
 

Author Closing Comment

by:nsteele84
Comment Utility
Thats what I was looking for thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now