Hi,
Having a slight problem with how to pass parameters to functions between
threads.
I have a form with a progress bar and a description label on it. It has a
public function
IncrementProgre ssBar() that just calls performstep on the progress bar.
On my main form I create a thread which creates the progress bar form
Then using
MethodInvoker mi = new MethodInvoker(m _ProgressBar.In crementProgress Bar);
this.BeginInvok e(mi);
I can get this function called wherever is appropriate.
All is fine. But I want a function that takes a string as a parameter so I
can dynamically update the description.
Any idea how to do this? I've searched google and found nothing so far.
I've tried
MethodInvoker mi = new MethodInvoker(m _ProgressBar.Up dateDescription );
object[] args = {m_txtUpdateDes cription.Text};
this.BeginInvok e(m_ProgressBar .UpdateTitle, args);
but the first line doesn't compile.
Rollasoc
Having a slight problem with how to pass parameters to functions between
threads.
I have a form with a progress bar and a description label on it. It has a
public function
IncrementProgre ssBar() that just calls performstep on the progress bar.
On my main form I create a thread which creates the progress bar form
Then using
MethodInvoker mi = new MethodInvoker(m _ProgressBar.In crementProgress Bar);
this.BeginInvok e(mi);
I can get this function called wherever is appropriate.
All is fine. But I want a function that takes a string as a parameter so I
can dynamically update the description.
Any idea how to do this? I've searched google and found nothing so far.
I've tried
MethodInvoker mi = new MethodInvoker(m _ProgressBar.Up dateDescription );
object[] args = {m_txtUpdateDes cription.Text};
this.BeginInvok e(m_ProgressBar .UpdateTitle, args);
but the first line doesn't compile.
Rollasoc
Comment