Call :
UpdateSendTextBox(pmsData);
Code:
public void UpdateSendTextBox(string value)
{
if (InvokeRequired)
{
this.Invoke(new Action(UpdateSendTextBox), new object[] { value });
return; // important to return in a recursive call.
}
if(!sendingTextBox.IsDisposed) // will not update if application is closing
sendingTextBox.Text = value;
}
It will recursively call the UpdateSendTextBox with a new ui thread to update. That's it.
Life is good.

No comments:
Post a Comment