Point p = this.Location; Form2 form2 = new Form2(p); int l2 = this.Width/2 - form2.Width / 2; int t2 = this.Height/2 - form2.Height / 2; int l = p.X + l2; int t = p.Y +t2; form2.Location = new Point(l, t); form2.ShowDialog();
2022-12-11 15:50:52
Point p = this.Location; Form2 form2 = new Form2(p); int l2 = this.Width/2 - form2.Width / 2; int t2 = this.Height/2 - form2.Height / 2; int l = p.X + l2; int t = p.Y +t2; form2.Location = new Point(l, t); form2.ShowDialog();
下一篇:c#实现两个窗体相互传值