I've just came across this interesting solution to update winform controls from child thread
private void button17_Click(object sender, EventArgs e)
{
// Create and start Worker Thread using anonymous delegate.
new Thread((ThreadStart)delegate()
{
for (int i = 0; i < 5; i++)
{
//this.richTextBox1.AppendText("Cross-thread operation will not work.");
// Update UI on the UI thread using another anonymous delegate.
this.BeginInvoke((ThreadStart)delegate()
{
this.richTextBox1.AppendText("Worker updated UI.\n");
});
}
}).Start();
}
Many thanks to William Stacey [MVP]