public Form1() { InitializeComponent(); mainScreen ms = new mainScreen(); ms.Location = new Point(this.Width - ms.Width / 2, (this.Height - ms.Height) / 2); this.Controls.Add(ms); }
private void tryAgainButton_Click(object sender, EventArgs e) { Refresh(); Form f = this.FindForm(); f.Controls.Remove(this); mainScreen ms = new mainScreen(); ms.Location = new Point((f.Width - ms.Width)/ 2, (f.Height - ms.Height) / 2); f.Controls.Add(ms); }
private void tryAgainButton_Click(object sender, EventArgs e) { Refresh(); Form f = this.FindForm(); f.Controls.Remove(this); mainScreen ms = new mainScreen(); ms.Location = new Point((f.Width - ms.Width) / 2, (f.Height - ms.Height) / 2); f.Controls.Add(ms); }