Click here to Skip to main content
11,578,739 members (61,127 online)
Rate this: bad
Please Sign up or sign in to vote.
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 0:42am
Manfred R. Bihy at 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 at 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 at 10-Aug-12 7:00am
its like i have 2 buttons to genarate pdf and generate excel both can be done ??
Wes Aday at 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 at 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
0 Peter Leow 135
1 Frankie-C 115
2 OriginalGriff 113
3 Richard MacCutchan 85
4 Afzaal Ahmad Zeeshan 75
0 OriginalGriff 933
1 Sergey Alexandrovich Kryukov 740
2 Abhinav S 573
3 F-ES Sitecore 420
4 Suvendu Shekhar Giri 403

Advertise | Privacy | Mobile
Web04 | 2.8.150603.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