oz1cz
0
Q:

how to invoke textbox from another task in c#

if (progressBar.InvokeRequired)
               {

                   void Invoker()
                   {
                       progressBar.Properties.Maximum = count;


                       progressBar.PerformStep();
                       progressBar.Update();
                   }
                   progressBar.Invoke((MethodInvoker)Invoker);
               }
               else
               {
                   progressBar.PerformStep();
                   progressBar.Update();
               }
               
               
               
 //////////////////////// or
 //Update progress bar in separate task
progressBarControl.Invoke((Action) (() =>
progressBarControl.EditValue = 100));
0

New to Communities?

Join the community