public static void ShowProgressbar(string message, float value) { if (!ProgressBarShowed) { progressThread = new Thread(() => { Progressbar = new Progressbar(); Progressbar.ShowDialog(); }) { IsBackground = true }; ProgressBarShowed = true; progressThread.Start(); } while (Progressbar == null || !Progressbar.isReady) { Thread.Sleep(100); } Progressbar.setMessage(message, value); }