am wondering why this code fails to focus the textbox...?
private void sendEmail_btn_Click(object sender, EventArgs e)
{
String sendTo = recipientEmail_tbx.Text.Trim();
if (!IsValidEmailAddress(sendTo))
{
MessageBox.Show("Please Enter valid Email address","Cognex" MessageBoxButtons.OK, MessageBoxIcon.Error);
recipientEmail_tbx.Focus();
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…