private void btPrint_Click(object sender, EventArgs e) { using (frmPrint frm = new frmPrint()) { splashScreenManager1.ShowWaitForm(); frm.PrintPurchaseBill(txPurchaseID.Text, cbEmployee.Text, purchaseDate.DateTime); splashScreenManager1.CloseWaitForm(); frm.ShowDialog(); frm.Owner = this; } }