private void bubtnSettings_Click(object sender, EventArgs e) { ofrm_SettingMain = new frm_SettingMain(); ofrm_SettingMain.MdiParent = this; ofrm_SettingMain.Dock = DockStyle.Fill; pnlfrm_AdminMain.Controls.Add(ofrm_SettingMain); ofrm_PatientsMain.Hide(); ofrm_SettingMain.Show(); }
private void frm_AdminDeshboard_Load(object sender, EventArgs e) { this.MaximumSize = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); this.MinimumSize = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); this.WindowState = FormWindowState.Maximized; MinimumSize = MaximumSize = this.Size; this.SetDesktopBounds(0, 0, Width, Height); this.CenterToParent(); ofrm_PatientsMain = new frm_PatientsMain(); ofrm_SettingMain = new frm_SettingMain(); ofrm_AdminDashboard = new frm_AdminDashboard(); ofrm_AdminDashboard.MdiParent = this; ofrm_AdminDashboard.Dock = DockStyle.Fill; pnlfrm_AdminMain.Controls.Add(ofrm_AdminDashboard); ofrm_AdminDashboard.Show(); }