Click here to Skip to main content
15,923,083 members
Home / Discussions / C#
   

C#

 
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 
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 
namespace MailTest
{
    public partial class Form1 : Form
    {
        string strServer;
        string strPort;
        string strUser;
        string strPassword;
        string strOutput;

        public Form1()
        {
            InitializeComponent();
            InitializeBackgroundWorker();
            InitializeBackgroundWorker2();
            InitializeBackgroundWorker3();

            btnGetMessageInfo.Enabled = false;
            btnCancelConnection.Enabled = false;

        }


That is where they are "Initialized"... and then further down are the private void InitializeBackgroundWorker3() for each of them.

Though I think I could just do the follwoing where you have InitializeBackgroundWorker(); & InitializeBackgroundWorker2(); & InitializeBackgroundWorker3();
Backgroundworker bgw1();
//etc
Backgroundworker bgw2();
......


the working example I found for C# has it as I have it now, VB I have it like the section I just posted...
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 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
PIEBALDconsult10-Feb-11 9:54
mvePIEBALDconsult10-Feb-11 9:54 
GeneralRe: Can you run the same function from two backgroundWorkers Pin
MacRaider411-Feb-11 1:27
MacRaider411-Feb-11 1:27 

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.