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.
 

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

Similar Threads

Debugging Error 1
Events 3
Raise event problem 1
WPF Event happening twice. 2
Help with Event handler, withevents, raise events 14
RaiseEvent not firing... 10
Strange RaiseEvent Problem 3
Add inner control event. 2

Back
Top