private void Student_Click(object sender, EventArgs e) { Init(); StudentMain student = new StudentMain(); student.MdiParent = this; student.StartPosition = FormStartPosition.CenterScreen; form = student; student.Show(); }
private void Student_Click(object sender, EventArgs e) { Init(); StudentMain student = new StudentMain(); student.MdiParent = this; student.StartPosition = FormStartPosition.CenterScreen; student.MaximizeBox = false; student.Dock = DockStyle.Fill; form = student; student.Show(); }
protected override void OnShown(EventArgs e) { Init(); StudentMain student = new StudentMain(); student.MdiParent = this; student.StartPosition = FormStartPosition.CenterScreen; student.MaximizeBox = false; student.Dock = DockStyle.Fill; form = student; student.Show(); }
protected override void OnShown(EventArgs e) { int xWidth = SystemInformation.PrimaryMonitorSize.Width; //获取显示器屏幕宽度 int yHeight = SystemInformation.PrimaryMonitorSize.Height; //高度 this.Location = new Point((xWidth - Width) / 2, (yHeight - Height) / 2); Init(); StudentMain student = new StudentMain(); student.MdiParent = this; student.StartPosition = FormStartPosition.CenterScreen; form = student; student.Show(); }