I have a Windows form from which I would like to open a status form that says "Saving..." and then disapears when the saving is complete. I would like to center this small status form in the middle of the calling form. I ve tried setting the "StartPosition" propery to "CenterParent", but it doest work. I create the status form from the other form like so:
SavingForm saving = new SavingForm();
savingForm.Show();
Thread.Sleep(500); //Someone said this is bad practice ... why?
savingForm.Close();
Wouldn t the calling form be the "Parent"? When I set a watch for saving it says it has no parent.
我试过。
SavingForm saving = new SavingForm();
saving.Parent = this;
savingForm.Show();
Thread.Sleep(500);
savingForm.Close();
并且放弃了一种例外情况,即不能将“Top级控制”列入“控制”。
我如何将此状态窗口居中在调用窗口中?
提前感謝。