答案 0 :(得分:0)
您需要订阅文本框的Leave
事件。
private void FileNo_txt_Leave(object sender, System.EventArgs e)
{
//check if that file number is exist in the database or not
//PatientName_txt.Focus(); if you want to automatically focus any textbox
}
了解更多信息 Try this
答案 1 :(得分:0)
private void FileNo_txt_Leave(object sender, System.EventArgs e)
{
//check if that file number is exist in the database or not.
}
还在构造函数中添加此行(表单构造函数)
this.FileNo_txt.Leave+= new System.EventHandler(this.FileNo_txt_Leave);