Professional Documents
Culture Documents
Private Void Button1
Private Void Button1
{
if ((this.txtUser.Text == "nhom23vdk") && (this.txtPass.Text == "123456"))
{
Form2 f = new Form2();
f.Show();
}
else
{
MessageBox.Show("Không đúng tên người dùng / mật khẩu!!!", "Thông báo");
this.txtUser.Focus();
}
DialogResult traloi;
traloi = MessageBox.Show("Chắc không?", "Trả lời",
MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (traloi == DialogResult.OK)
{
Application.Exit();
}
else this.txtUser.Focus();
}
}
}
}