title: How to move messagebox messages to list
body: <p>I have an application in which i am generating status messages frequently. I am printing all these messages to message box. Instead of using message box i want to use  list box or multi line text box . How should i proceed.</p>
  
  <pre><code>void client_MqttMsgPublishReceived(object sender, MqttMsgPublishEventArgs e)
  {
      publishstatusTextbox.Items.Insert(0, DateTime.Now.ToString("hh:mm:ss:fff") + "MessageID=");
  }
  </code></pre>
  
  <p>I'm getting following exception</p>
  
  <blockquote>
    <p>cross thread operation not valid "publishstatusListbox" is accessed from the thread other than the thread it was created on</p>
  </blockquote>