private void barangToolStripMenuItem_Click(object sender, EventArgs e) { if (frmBarang == null) { frmBarang = new FormMasterBarang(); frmBarang.FormClosed += new FormClosedEventHandler(frmBarang_fromClosed); frmBarang.ShowDialog(); } else { frmBarang.Activate(); } }
void frmBarang_fromClosed(object sender, FormClosedEventArgs e) { frmBarang = null; }