R
Ryan
I have a windows form that I want to force validation on controls (text
boxes) when the user clicks a "Save" button. The only way I've found to do
this is to cycle through every control and call it's .Select() method. This
is clunky though because you can see a flash in each text box as it's being
validated. Here's my code
Private Sub Save()
For each c as control in Me.Controls
If c.CanSelect() then
c.Select()
End if
Next c
End Sub
Each control has code in their Control_Validating event that fires off an
errorprovider.
boxes) when the user clicks a "Save" button. The only way I've found to do
this is to cycle through every control and call it's .Select() method. This
is clunky though because you can see a flash in each text box as it's being
validated. Here's my code
Private Sub Save()
For each c as control in Me.Controls
If c.CanSelect() then
c.Select()
End if
Next c
End Sub
Each control has code in their Control_Validating event that fires off an
errorprovider.