private void 학생관리ToolStripMenuItem_Click(object sender, EventArgs e) { frmStudent frm = new frmStudent(); frm.MdiParent = this; frm.Show(); frm.Activate(); }
public static frmStudent CreateStudentForm() { if (frm == null) { frm = new frmStudent(); } return(frm); }
private void 학생관리ToolStripMenuItem_Click(object sender, EventArgs e) { frmStudent frm = frmStudent.CreateStudentForm(); frm.MdiParent = this; frm.WindowState = FormWindowState.Maximized; frm.Show(); frm.Activate(); }
private void 학생관리ToolStripMenuItem_Click(object sender, EventArgs e) { if (studentFrm == null) { studentFrm = new frmStudent(); studentFrm.MdiParent = this; studentFrm.Show(); // Load => Shown => Activate } else { studentFrm.Activate(); // Activate } }
private void frmStudent_FormClosing(object sender, FormClosingEventArgs e) { frm = null; }