private void allPaymentsToolStripMenuItem_Click(object sender, EventArgs e) { AllPayments objAllPayments = new AllPayments(); objAllPayments.MdiParent = this; objAllPayments.Show(); }
private void allPaymentsToolStripMenuItem_Click(object sender, EventArgs e) { AllPayments allPayments = new AllPayments(); allPayments.WindowState = System.Windows.Forms.FormWindowState.Maximized; allPayments.MdiParent = this; allPayments.Visible = true; }
private void ShowReportAllPayments() { if (allPayments == null) { allPayments = new AllPayments(); allPayments.MdiParent = this; allPayments.FormClosed += AllPayments_FormClosed; allPayments.Show(); } else { allPayments.Activate(); } }
// Set form instance to null on form close private void AllPayments_FormClosed(object sender, FormClosedEventArgs e) { allPayments = null; }