Is there an equivalent .lostfocus in VB.NET?

  • ljCharlie
  • Proficient
  • Proficient
  • ljCharlie
  • Posts: 343

Post 3+ Months Ago

Is there an equivalent event for the .lostfocus in VB.NET? I thouht there is the .Leave but it wasn't working. Here's my situation.

In the txtUserName textbox, I set a KeyUp event to capture the Enter key. If the user hit the enter key, then move the focus to the txtPassword textbox. And in the txtPassword textbox I also setup a KeyUp event to catch the Enter key. If in the txtPassword the user hit the Enter key, then performclick on the btnOK button. Now the problem is, if the user type in the wrong password and the error messagbox popup and the user hit the Enter key again, the error messagebox kept on poping up. That is because the focus is still on the txtPassword textbox. So my question is, is there a way to lose the focus on that txtPassword textbox?


Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 39 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.