Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# update control from another thread

// Running on the worker thread
string newText = "abc";
form.Label.Invoke((MethodInvoker)delegate {
    // Running on the UI thread
    form.Label.Text = newText;
});
// Back on the worker thread
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #update #control #thread
ADD COMMENT
Topic
Name
1+9 =