private void UpdateProgressBar(int value) { if (m_formClosing) return; if (InvokeRequired) { BeginInvoke(new Action<int>(UpdateProgressBar), value); } else { progressBar.Value = value; } }