Results 1 to 21 of 21

Thread: Wait for Backgroundworker to finish

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Wait for Backgroundworker to finish

    How can I wait for a backgroundWorker to finish and still be in the same void?
    For example:

    I send a list with files to process to a void, DoThem(list).
    Then in that void, if the file is a txt, send it to backgroundworker1. If the file is a jpg send it to backgroundworker2.

    But I only want one backgroundworker to run at the same time (reporting progress to the same progressbar).

    I know the bw has a bwFinished event, but if I need to use that I would need to do a hell of a more programming that looks quite ugly to me (passing a parameter with what to do when finished blablabla).

    What I have read you can use the WaitOne thingy. But it locks the UI and I want to be able to change the progressbar all the time.
    Last edited by Cyb3rH4Xter; Mar 20th, 2011 at 05:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width