DashBoard Panel
private Form activeFrom = null; private void OpenChildForm(Form childForm) { if (activeFrom != null) activeFrom.Close(); activeFrom = childForm; childForm.TopLevel = false; childForm.FormBorderStyle = FormBorderStyle.None; childForm.Dock = DockStyle.None; PanelChildForm.Controls.Add(childForm); PanelChildForm.Tag = childForm; childForm.BringToFront(); childForm.Show(); }
Form Open Code
private void btnConfig_Click(object sender, EventArgs e) { OpenChildForm(new ConfigForm()); }