0

我正在尝试创建一个带有褪色(模糊)背景的加载窗口,它会锁定所有其他窗口

淡出背景以锁定其他窗口有什么问题吗?!

4

2 回答 2

0

try with this code

foreach (Control item in this.Controls)
{
  if (item is Window 
      && item.Id != yourWindow )
  {
     item.Enabled = false;
  }
}
于 2012-07-31T08:54:48.063 回答
0

With WPF I used something similar.

I created a usercontrol which has the app size with transparent background, and in the center, a loading faded form.

As the control is loaded top most, the control lock the app (user cannot click anywhere because of the transparent background). You can do some pretty graphical stuff with that. Hope it helps.

Without WPF, you can use modal dialog.

于 2012-07-31T08:55:05.490 回答