Validation without Focus

G

Guest

The only way to fire the validation event for a control seems to required
that control receive the focus first. This only works if the user is good
enough to visit each control. What happens if they try to close the form
before they have visited other controls, but they are not yet valid? There
should be a way to invoke validation, but I can find anything like it in the
documentation. Thanks.
 
A

Adam Boczek

You have to walk the list of controls on the form (and controls in controls
like frames etc.), setting each one in turn to have focus and then trigger
Validating event by calling form's Validate method.
 

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

Top