第1个回答 2017-10-17
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
//this.IsMdiContainer = true;
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.StartPosition = FormStartPosition.Manual;
frm.Location = new Point(this.Location.X + this.Width / 2 - frm.Width / 2, this.Location.Y + this.Height / 2 - frm.Height / 2);
frm.Show();
}
}