Click here to Skip to main content
15,890,845 members
Home / Discussions / C#
   

C#

 
AnswerRe: Can you run the same function from two backgroundWorkers Pin
Luc Pattyn10-Feb-11 6:18
sitebuilderLuc Pattyn10-Feb-11 6:18 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 6:38
MacRaider410-Feb-11 6:38 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
PIEBALDconsult10-Feb-11 6:45
mvePIEBALDconsult10-Feb-11 6:45 
AnswerRe: Can you run the same function from two backgroundWorkers Pin
Luc Pattyn10-Feb-11 6:46
sitebuilderLuc Pattyn10-Feb-11 6:46 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
AspDotNetDev10-Feb-11 7:27
protectorAspDotNetDev10-Feb-11 7:27 
GeneralRe: Can you run the same function from two backgroundWorkers [modified] Pin
PIEBALDconsult10-Feb-11 6:42
mvePIEBALDconsult10-Feb-11 6:42 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 7:44
MacRaider410-Feb-11 7:44 
GeneralRe: Can you run the same function from two backgroundWorkers [modified] Pin
MacRaider410-Feb-11 8:13
MacRaider410-Feb-11 8:13 
Ok just ran into something interesting, I'm trying to add the 3rd worker to my form and it's telling me it doesn't exist in the current context:

public Form1()
       {
           InitializeComponent();
           InitializeBackgroundWorker();
           InitializeBackgroundWorker2();
           InitializeBackgroundWorker3();  //shows up on this line blue underline with above message

and then here
private void InitializeBackgroundWorker2()
        {
            backgroundWorker2.DoWork += new DoWorkEventHandler(backgroundWorker2_DoWork);
            backgroundWorker2.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker2_RunWorkerCompleted);
            backgroundWorker2.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker2_ProgressChanged);
        }

        private void InitializebackgroundWorker3()
        { //blue underline for all these                   //however the "top" one here doesn't but the rest do ?
            backgroundWorker3.DoWork += new DoWorkEventHandler(backgroundWorker3_DoWork);
            backgroundWorker3.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker3_RunWorkerCompleted);
            backgroundWorker3.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker3_ProgressChanged);
        }


As you can see there is nothing different between them, I'm a bit confused...

modified on Thursday, February 10, 2011 2:20 PM

GeneralRe: Can you run the same function from two backgroundWorkers Pin
PIEBALDconsult10-Feb-11 8:21
mvePIEBALDconsult10-Feb-11 8:21 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 8:40
MacRaider410-Feb-11 8:40 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
Luc Pattyn10-Feb-11 8:22
sitebuilderLuc Pattyn10-Feb-11 8:22 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 9:17
MacRaider410-Feb-11 9:17 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
Luc Pattyn10-Feb-11 9:52
sitebuilderLuc Pattyn10-Feb-11 9:52 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
PIEBALDconsult10-Feb-11 8:18
mvePIEBALDconsult10-Feb-11 8:18 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 8:28
MacRaider410-Feb-11 8:28 
AnswerRe: Can you run the same function from two backgroundWorkers Pin
Luc Pattyn10-Feb-11 8:39
sitebuilderLuc Pattyn10-Feb-11 8:39 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 8:51
MacRaider410-Feb-11 8:51 
AnswerRe: Can you run the same function from two backgroundWorkers Pin
Luc Pattyn10-Feb-11 9:03
sitebuilderLuc Pattyn10-Feb-11 9:03 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
PIEBALDconsult10-Feb-11 9:06
mvePIEBALDconsult10-Feb-11 9:06 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
PIEBALDconsult10-Feb-11 8:55
mvePIEBALDconsult10-Feb-11 8:55 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 9:06
MacRaider410-Feb-11 9:06 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
Luc Pattyn10-Feb-11 9:16
sitebuilderLuc Pattyn10-Feb-11 9:16 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
PIEBALDconsult10-Feb-11 8:48
mvePIEBALDconsult10-Feb-11 8:48 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 9:03
MacRaider410-Feb-11 9:03 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider410-Feb-11 9:22
MacRaider410-Feb-11 9:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.