Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# change label from thread

  private void DoOnUI()
        {
            string text = "something";
            if (this.label1.InvokeRequired)
            {
                this.label1.BeginInvoke((MethodInvoker)delegate () { this.label1.Text = text; });
            }
            else
            {
                this.label1.Text = text;
            }
        }
 
PREVIOUS NEXT
Tagged: #change #label #thread
ADD COMMENT
Topic
Name
2+8 =