private void btnCreatePDF_Click_1(object sender, EventArgs e) { Form9_GeneratePDF form9 = new Form9_GeneratePDF(); form9.Closed += (s, args) => Close(); form9.ShowDialog(); //exportToPDF(visitor1TableAdapter.GetData()); //MessageBox.Show("Print Success."); }