// Server stop began private void ServerNetworkNetworkEngineStopBegan(int clientsCount) { new Thread(() => { Thread.CurrentThread.IsBackground = true; _FrmProgressBarDisconnect = new FrmServerProgressBar(clientsCount); if (InvokeRequired) { Invoke(new MethodInvoker(delegate { _FrmProgressBarDisconnect.Show(); })); } else { _FrmProgressBarDisconnect.Show(); } }).Start(); }