private void btnSubmit_Click(object sender, EventArgs e) { parentForm.school.ImageFile = txtFilePath.Text; Setup3 setup3 = new Setup3(parentForm); setup3.ShowDialog(); this.Close(); }