private void replayButton_Click(object sender, EventArgs e) { //Move to game screen mainScreen ms = new mainScreen(); Form f = this.FindForm(); //Remove Main Screen f.Controls.Remove(this); f.Controls.Add(ms); }
public Form1() { //Create High Score File if (!File.Exists(filePath)) { File.Create(filePath); } else { string[] lines = File.ReadAllLines(filePath); string[] newLines = new string[lines.Count() + 1]; foreach (var s in lines) { } } InitializeComponent(); //Go to main Screen mainScreen ms = new mainScreen(); this.Controls.Add(ms); }