Click here to Skip to main content
11,928,587 members (54,940 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# BackgroundWorker
I am generating pdf which will get stored in a path mention how can i use background worker to accomplished the task. Its Winforms c#
Posted 10-Aug-12 1:42am
Manfred R. Bihy 10-Aug-12 6:47am
Which parts are you having difficulties with? Using a Backgroundworker is very straightforward, so there must be some detail, that would explain what is giving you trouble, missing from your question.
Please edit your question and add the interesting bits.


rohit24c 10-Aug-12 6:59am
I have a save()
// i am writing logic to save the pdf here...
Now ot take time to save all pdfs in a path by that time i can allow the user to use other AREAS of my application.
rohit24c 10-Aug-12 7:00am
its like i have 2 buttons to genarate pdf and generate excel both can be done ??
Wes Aday 10-Aug-12 7:06am
Read the documentation for the backgroundworker class.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

In a sample on MSDN you can learn how a BackgroundWorker operates: How to: Run an Operation in the Background[^]. The DoWork and RunWorkerCompleted event handlers you'll hook up to the backgroundworker will do the brunt of the work. You'll have to make sure though that the processing and/or save method is encapsulated in a class you should define. That way you won't pollute your code and everything is neatly separated. It will also make it easier for you to track the progress of the processing and saving in the front end, especially when there is more than one process going on at any one time.


Mika Wendelius 10-Aug-12 16:04pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 10 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100