Control (Public Event)

A

Amit Chandel

I've built a control, with an imgThumbNail. On DoubleClick I'm
raising OpenProductWeb. How can I catch this in my winform. I knew
how to do this once. Please refresh my memory ...

Thanks...
AC


CONTROL CODE ------------

Public Event OpenProductWeb(ByVal oProduct As ProductThumb)

Private Sub imgTN_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles imgTN.DoubleClick
RaiseEvent OpenProductWeb(Me)
End Sub
 
G

Guest

Once you have placed your control on a form, view the code of this form.
Within the class name drop down select the control you have just added to the
form, within the method name drop down select OpenProductWeb. This should
give you some code that looks like this:

Private Sub myControl_OpenProductWeb(ByVal oProduct As ProductThumb) Handles
myControl.OpenProductWeb
End Sub

Hope this helps.
Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top