C textbox validating event not firing
I've created another forms project, and added an inherited form to it.
The form loads, but the textbox validating and validated events never fire (unless I set causes validation on the textbox to true, then the validating event fires when I click the button).
Click on a button by default causes validation of the control that are losting the focus, so you can't click on button, as you see your button reflect to mouse but not actually click.
You can simply simulate such behavior by handling I have discovered the issue after further testing.
My team members have reviewed, and also can't spot the problem.
Here is a simplified view of my code: Designer Generated Code Edit: Additional Information from Testing There are several dropdownlists in my form.
That way, you could at least figure out if the problem comes from your class library or from VSTO. I've now recreated a really simple situation: Created a class library with one form with one textbox, and one button.
Have you tried calling your class library code from a straightforward Windows app?
I have several forms in this application (a main form, and several specialised forms), and on only one form, click events are not firing for any of my buttons. This can be determined by the fact that a breakpoint on the first line of the handler is never reached when clicking the button.
Other events are working (I'm using Checked Changed events on this form and they are behaving).
The following code example uses the derived class Text Box and validates an e-mail address that the user enters.
If the e-mail address is not in the standard format (containing "@" and "."), the validation fails, an Error Provider icon is displayed, and the event is canceled.
I've also simplified it to have only one row/cell.