private void aboutPayrollApplicationToolStripMenuItem_Click(object sender, EventArgs e) { AboutPayrollSystem objAbout = new AboutPayrollSystem(); objAbout.MdiParent = this; objAbout.Show(); }
private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { if (aboutPayrollSystem == null) { AboutPayrollSystem aboutPayrollSystem = new AboutPayrollSystem(); aboutPayrollSystem.MdiParent = this; aboutPayrollSystem.Show(); } else { aboutPayrollSystem.Activate(); } }
private void ShowAboutPayrollForm() { if (aboutPayroll == null) { aboutPayroll = new AboutPayrollSystem(); aboutPayroll.FormClosed += AboutPayroll_FormClosed;// Call this method after form is closed aboutPayroll.MdiParent = this; aboutPayroll.Show(); } else { // If instance is already present, activate it and give it focus aboutPayroll.Activate(); } }