public MainWindow() { InitializeComponent(); HomeForm home = new HomeForm(this); home.Size = this.Size; MainWindowCurrentForm = home; }
private void tsmiHome_Click(object sender, EventArgs e) { HomeForm home = new HomeForm(); MainWindowCurrentForm.Close(); home.MdiParent = this; home.Size = this.Size; home.WindowState = FormWindowState.Maximized; home.Show(); MainWindowCurrentForm = home; }