private void Empty_Leave(object sender, EventArgs e) { if (UserNameTxt.Text == "") { UserNameTxt.Focus(); MessageBox.Show("NO username provided"); } if (passwordtxt.Text == "") { passwordtxt.Focus(); MessageBox.Show("NO password provided"); } }