How do I access threadmain elements in other threads?

Asked

Viewed 52 times

0

I’m with this mistake

Threaded operation not valid: 'Lblcheck' control accessed to from a thread other than the thread where it was created.

 Task tarefa = Task.Run(() =>{

  }
  .ContinueWith(t => {
                    LblCheck.Text = "Programa pronto para ser usado!";
                    progressBar1.Value = 100;
 }); 

How I can access main thread elements in other threads ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.