Control (Public Event)

  • Thread starter Thread starter Amit Chandel
  • Start date Start date
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
 
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.
 
Back
Top