I have a form 'frmProgressBar', which is shown as popup using obj.showDialog(). This form has a backgroundworker thread running, which keeps running till the processing in other forms is not compleated. I want to hide this form whenever the main form is minimised and this form is getting hidden also. But the problem is, when the main window is maximized, I want to show the popup form again. I checked !IsDestroyed which returns false, so the thread is still running, but the form is not displayed in the foreground. I tried Show(), BringToFront(), TopLayer = True, but nothing seems to work. Any hellp please.It is very urgent.
bool bContinue = true;
public frmProgressBar(string Message)
{
InitializeComponent();
this.ShowInTaskbar = false;
lblMessage.Text = Message ;
backgroundWorker = new BackgroundWorker();
backgroundWorker.DoWork += new DoWorkEventHandler(backgroundWorker_DoWork);
backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker_RunWorkerCompleted);
}
//This is called when my main window is resized
Show();
WindowState =
Hide();
Thank You,