private void SetText(System.Windows.Forms.Control control, string text) { if (control.InvokeRequired) { SetTextCallback d = new SetTextCallback(SetText); Invoke(d, new object[] { control, text }); } else { control.Text = text; } }