Windows Form Validation

  • Thread starter Thread starter Bradley M. Small
  • Start date Start date
B

Bradley M. Small

On an application, I have several boxes and I want to validate such that
someone can't enter a number too big. However, once they do enter a number
in that box, I want to immediately do something else (dynamically populate a
list box).


I have been able to use Text1Validating with e.Cancel=True to stop then from
leaving the field, but when I do Text1Changed it is still called. Am I
perhaps using the wrong events?

Also, I would like to beep and select all text in that textbox or somehow
otherwise alert the user that they are attempting something invalid, how
best to handle this?
 
Ok so now that I have been pointed to the errorProvider, how do I allow my
exit button to exit the app without validating the textbox? I tried setting
CausesValidation to false, but it still triggers it.
 
Back
Top