public static void updateProgressInvoke(DialogProgress dialogProgress, string text) { // Wait for thread to become avaiable if (dialogProgress.IsHandleCreated) { dialogProgress.Invoke((MethodInvoker) delegate() { dialogProgress.updateProgress(text); }); } }