Why TopMost make form at The top of all applicatio
Hi Guys,
I have two forms. One is main form from where i am calling a progress bar form. I set progress bar TopMost Property True because i want to show progress bar at top.
I am calling progress bar as independent thread. It show progress bar at the Top of All Applications. But i just want to show the Progress bar only at the top of my application.
Here is my code
thread= new Thread(new ThreadStart(ShowProgressDialog));
thread.IsBackground = true;
thread.Start();
private void ShowProgressDialog()
{
progress = new ProgressBarForm();
startTime = DateTime.Now.ToLongTimeString();
this.startTimeLbl.Text = startTime;
ProgressBarForm.startTime ="Start Time: "+ startTime;
progress.TopMost = true;
progress.ShowDialog(this);
}
I am using .Net 1.1. I tried to set TopMost property of Progress bar before calling ShowDialog(this) but it also does not work.
Any suggession please.
Best regards
|