Click here to Skip to main content
15,889,335 members
Home / Discussions / C#
   

C#

 
QuestionHow to: Make Thread-Safe Calls to Windows Forms Controls Pin
gizmokaka18-Sep-07 10:16
gizmokaka18-Sep-07 10:16 
AnswerRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
Pete O'Hanlon18-Sep-07 10:22
mvePete O'Hanlon18-Sep-07 10:22 
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
gizmokaka18-Sep-07 10:25
gizmokaka18-Sep-07 10:25 
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
Pete O'Hanlon18-Sep-07 10:28
mvePete O'Hanlon18-Sep-07 10:28 
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
gizmokaka18-Sep-07 10:41
gizmokaka18-Sep-07 10:41 
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
Dave Kreskowiak18-Sep-07 10:48
mveDave Kreskowiak18-Sep-07 10:48 
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
gizmokaka18-Sep-07 11:01
gizmokaka18-Sep-07 11:01 
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
gizmokaka19-Sep-07 2:17
gizmokaka19-Sep-07 2:17 
O.K
I read about background Worker but now I have another question,
my main problem is, that I run ,on my BGWorker, a function from a different class.
I want that function to report progress so I can update the progressBar that belongs to my form.
how do I make it possible for the function to update my outside control, or even call
the reportProgress??

Waiting for your help...Smile | :)

thanks in advanced.

//form 
 private void OffsetAButton_Click(object sender, EventArgs e)
        {
            frmPicoBackgroundWorker.DoWork += new DoWorkEventHandler(frmPicoBackgroundWorker_DoWork);
            frmPicoBackgroundWorker.ProgressChanged +=new ProgressChangedEventHandler(frmPicoBackgroundWorker_ProgressChanged);
            frmPicoBackgroundWorker.RunWorkerAsync(updateProgress);

        }


//form
private void frmPicoBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            PICO.start_ChannelA_Offsetting(ref updateProgress); //in a different class
            
            frmPicoBackgroundWorker.ReportProgress(updateProgress);

        }


//form
private void frmPicoBackgroundWorker_ProgressChanged(object Sender, ProgressChangedEventArgs e)
        {
            progressBarSampling.Step = updateProgress;
            progressBarSampling.PerformStep();
        }


these are just samples of the problematic code.
hope it helps you understand what I don't understand Smile | :)
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
Dave Kreskowiak19-Sep-07 11:50
mveDave Kreskowiak19-Sep-07 11:50 
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
Pete O'Hanlon18-Sep-07 10:50
mvePete O'Hanlon18-Sep-07 10:50 
GeneralRe: How to: Make Thread-Safe Calls to Windows Forms Controls Pin
gizmokaka18-Sep-07 11:02
gizmokaka18-Sep-07 11:02 
QuestionC# students in UK Pin
Francois Benadie18-Sep-07 10:09
Francois Benadie18-Sep-07 10:09 
AnswerRe: C# students in UK Pin
Pete O'Hanlon18-Sep-07 10:20
mvePete O'Hanlon18-Sep-07 10:20 
QuestionLinking function keys to buttons Pin
Dio2218-Sep-07 9:06
Dio2218-Sep-07 9:06 
AnswerRe: Linking function keys to buttons Pin
Giorgi Dalakishvili18-Sep-07 9:20
mentorGiorgi Dalakishvili18-Sep-07 9:20 
GeneralRe: Linking function keys to buttons Pin
Dio2218-Sep-07 10:17
Dio2218-Sep-07 10:17 
GeneralRe: Linking function keys to buttons Pin
Giorgi Dalakishvili18-Sep-07 10:24
mentorGiorgi Dalakishvili18-Sep-07 10:24 
GeneralRe: Linking function keys to buttons Pin
Dio2218-Sep-07 10:28
Dio2218-Sep-07 10:28 
GeneralRe: Linking function keys to buttons Pin
Giorgi Dalakishvili18-Sep-07 10:33
mentorGiorgi Dalakishvili18-Sep-07 10:33 
AnswerRe: Linking function keys to buttons Pin
Luc Pattyn18-Sep-07 9:44
sitebuilderLuc Pattyn18-Sep-07 9:44 
QuestionCalculate time with int Pin
andredani18-Sep-07 7:23
andredani18-Sep-07 7:23 
AnswerRe: Calculate time with int Pin
Matthew Cuba18-Sep-07 7:55
Matthew Cuba18-Sep-07 7:55 
GeneralRe: Calculate time with int Pin
Larantz18-Sep-07 7:59
Larantz18-Sep-07 7:59 
AnswerRe: Calculate time with int Pin
Guffa18-Sep-07 8:29
Guffa18-Sep-07 8:29 
QuestionEmployee Clock in/out application Pin
Skanless18-Sep-07 7:14
Skanless18-Sep-07 7:14 

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.