PC Review


Reply
Thread Tools Rate Thread

Control (Public Event)

 
 
Amit Chandel
Guest
Posts: n/a
 
      24th Nov 2004
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2hyaXMgUG9kbW9yZQ==?=
Guest
Posts: n/a
 
      24th Nov 2004
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.


"Amit Chandel" wrote:

> 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
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
public event in user control rodchar Microsoft ASP .NET 2 3rd Jul 2008 04:09 PM
Handling a public event from user control parulrgupta@gmail.com Microsoft ASP .NET 0 8th May 2006 07:42 PM
How to make a custom control's control public to parent container by default? farmer Microsoft ASP .NET 2 24th Oct 2005 11:28 PM
Changing a sub from the on click event of a control to a public function tmort@ci.grand-rapids.mi.us Microsoft Access VBA Modules 2 8th Apr 2005 10:03 PM
Public event with private event args? Dean Slindee Microsoft VB .NET 1 11th Jan 2005 07:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:50 AM.