User control validating event

Windows Forms provides several ways for you to validate input in your application.

If you do not set the Cancel property, Windows Forms will assume that validation succeeded for that control, and raise the Validated event.

Empty) End If End If End Sub Private Sub Validation Test_Form Closing( _ By Val sender As System.

Form Closing 'Close the form without the need for validation when Auto Validate is on e.

For a code example that validates an email address in a Text Box, see Validating.

Validation is very useful when you have bound your controls to a data source, such as a database table.

Leave a Reply