private void button1_Click(object sender, EventArgs e) { #region To Main Form pnlMain.Controls.Clear(); pnlMain.Visible = true; //load the form frmTeacher teachers = new frmTeacher(); teachers.TopLevel = false; teachers.AutoScroll = true; pnlMain.Controls.Add(teachers); teachers.Show(); #endregion }
private void btnAdd_Click(object sender, EventArgs e) { frmTeacher teacher = new frmTeacher(); }
private void frmEditTeacher_FormClosing(object sender, FormClosingEventArgs e) { frmTeacher teacher = new frmTeacher(); teacher.btnRefresh.PerformClick(); }