private void btnListOfStudents_Click(object sender, EventArgs e) { //LIst of students window StudentListWindow wnd = new StudentListWindow(TeacherID); wnd.FormClosed += ((o, s) => { this.Show(); }); wnd.Owner = this; wnd.Show(); this.Hide(); }