C# 窗体位于中间
注意不是用Show()方法
form2 A = new form2();
A.ShowDialog(this);//打开模式对话框
用位置计算
ProgressForm pForm = new ProgressForm();
pForm.Show();
pForm.Top = this.Top + this.Height / 2 - pForm.Height / 2;//窗口的像素,在窗体中间显示
pForm.Left = this.Left + this.Width / 2 - pForm.Width / 2;