Rafael Spessotto
Rafael Spessotto

Reputation: 161

Acessing the click event for a customized control

I made a customized control that is a picturebox and a button. When the user clicks on the button, i want to show a form that will capture the webcam image and put on the picturebox of the customized control. But i can access outside the control, the button click. I can access the control click but not only the button click...anyone can help me?

thanks!

Rafael

Upvotes: 0

Views: 48

Answers (1)

Jurgen Camilleri
Jurgen Camilleri

Reputation: 3589

In your control's constructor after the InitializeComponent() (if you have it), write

this.myButtonName.Click += (press Tab twice)

and the handler will automatically be created for you.

Upvotes: 1

Related Questions