public void SetProgressText(string text) { if (progressLabel.InvokeRequired) { progressLabel.BeginInvoke(new Action(() => { progressLabel.Text = text; })); } else { progressLabel.Text = text; } }