private void gantiPasswordMenu_Click(object sender, EventArgs e) { if (FormGantiPass == null) { FormGantiPass = new FormGantiPass(kodeKasir); FormGantiPass.FormClosed += new FormClosedEventHandler(formclose); FormGantiPass.ShowDialog(); } else { FormGantiPass.Activate(); } }
Conn conn = new Conn(); //mengambil class conn void formclose(object sender, FormClosedEventArgs e) { formLogin = null; FormGantiPass = null; }