private void DangKy_FormClosing(object sender, FormClosingEventArgs e) { DialogResult rs; rs = MessageBox.Show("Bạn muốn thoát?", "Thông báo!", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); if (rs == DialogResult.Yes) { TrangChu tc = new TrangChu(); tc.Show(); this.Hide(); } }