Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mimic JavaScript's onBlur event in Windows Forms?

Tags:

I have phone and email textboxes on a Windows Form that I want to validate when the user leaves the fields.

When I double click the textbox in Visual Studio form designer, it creates a textchanged event. This isn't quite suitable as want to call the validate method only when the user is done entering the full entry, not after every keystroke.

Is there a way to do this similar to onBlur event in JavaScript?

I have tried MouseLeave, Off Focus, and they all act like TextChanged.

How can this be done?