public MainForm() { Random rand = new Random(); number = rand.Next(1, 5); InitializeComponent(); this.IsMdiContainer = true; homeScreen = new HomeForm(number); homeScreen.MdiParent = this; homeScreen.Show(); }
private void homeToolStripMenuItem_Click(object sender, EventArgs e) { if (!home) { CloseCurrentWindow(); ResetViewBools(); home = true; homeScreen = new HomeForm(number); homeScreen.MdiParent = this; homeScreen.Dock = DockStyle.Top; homeScreen.Show(); } }