2
I have a Usercontrol, which does a validation in the Validated event, and on the screen, I have the Confirm button.
When I use the ALT+C shortcut, to run the button event, it will run the Validated event validation, and after that the button event.
There’s a way I can "cancel" the button event when there’s an error in my validation in Usercontrol?
I do not know if it was very clear, what I am trying to do. If you are a bit confused, follow below "prints" for better understanding:
Usercontrol:
Source code in the form:
When I click the Confirm button on the screen, it works right.
- First executes Validated validation, and returns. And does not execute the message that is on the "Confirm"
As mentioned above, if you run by the ALT+C shortcut, it will trigger both events.
Does anyone have a solution to this?
How you are associating the ALT+C shortcut to the button event?
– Marcus Vinicius
Marcus, good morning to you! .
– Felipe Duarte
Hello, please don’t post a print of your code in the question, put it yourself (like: start each line of code with four spaces at the beginning)
– CypherPotato