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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top