I have user control NumericKeyPad on the FormStart and I need, that when I click on button e.g. button3 (with Tag value: 3) on the Formstart textBoxEmployee# it writes 3 and so on…
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Create a custom event in the
UserControl, handle button click and raise it from there. Then, from the parent form, handle your custom event ofUserControl. To illustrate, here is a code sample (VB.NET – I am not very good at C#):