Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have many forms(each form contains textbox) ,and for example I want to
handle the keypress event in all forms with one handler...
but How? :confused:
Posted

1 solution

Make a wrapper abound a standard button, basically create a custom button, lets say it as BaseButton. Have a default implementation of this BaseButton, thus one handler.

Now, use this BaseButton on all the forms. If needed, override the handler for any single button/form to execute a different code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900