private void medicalSchoolsToolStripMenuItem_Click(object sender, EventArgs e) { //Instance of frmMedicalSchoolList frmMedicalSchoolList MedicalSchoolForm = new frmMedicalSchoolList(); //make its parent of this parent MedicalSchoolForm.MdiParent = this; //display the form MedicalSchoolForm.Show(); }
private void btnMedicalShoolLookup_Click(object sender, EventArgs e) { //creat an instance of frmMedicalSchoolList frmMedicalSchoolList MedicalSchoolLookup = new frmMedicalSchoolList(); //make the MDI parent of this form the MDI parent of MedicalSchoolLookup form MedicalSchoolLookup.MdiParent = this.MdiParent; //Open the form MedicalSchoolLookup.Show(); }
private void btnSelectfromMedList_Click(object sender, EventArgs e) { //create an instance of the frmMedicalSchoolList frmMedicalSchoolList MedicalSchoolListForm = new frmMedicalSchoolList(); //make the MDI parent of the form be this MDI parent form MedicalSchoolListForm.MdiParent = this.MdiParent; //(Note:concept of delegates (an event handler is a delegate) means we can //pass the method getMedicalSchoolSelectedFromList to the MedicalSchoolListForm object. Because they both have the same signature //the getGPSelected method can call that method MedicalSchoolListForm.MedicalSchoolSelectedFromList += new EventHandler(getMedicalSchoolSelectedFromList); //display the MedicalSchoolListForm MedicalSchoolListForm.Show(); }