Errorprovider validating event
Over the years, programmers have used many different error notification schemes with message boxes or form icons.
If all of these conditions are met, the program accepts the data input, signified by a message box.
In this case, you needn't cycle through every control and call its Select method to force validation. NET Application Architect, Enthusiast, & Evangelist T. Bradley - news: OH**************@TK2MSFTNGP04gbl... |I have a windows form that I want to force validation on controls (text | boxes) when the user clicks a "Save" button.
However, if the user doesn't edit in any textbox on the form and click the Save button directly, the textbox's Validating event won't be raised. The only way I've found to do | this is to cycle through every control and call it's . This | is clunky though because you can see a flash in each text box as it's being | validated. Select() | End if | Next c | End Sub | | Each control has code in their Control_Validating event that fires off an | errorprovider.
But in the real world, you need to handle unexpected problems when your code is running.
The user might delete a critical file or enter invalid data.