Create a click event for a custom user control

EXTRHMAN
EXTRHMAN used Ask the Experts™
on
I have created a custom user control, which consists of a panel and labels on the panel displaying different information that is returned from a query.  I programmatically add this new control to a windows form.  I add one new control for each record that is returned.  I want the user to be able to click anywhere on my new control and have the click event triggered.

I am not sure how to handle this.
I am using vb.net visual studio 2005

Thanks for the help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
You need to declare your own custom click event to raise from your usercontrol.

Then in the click event of every panel/label you raise your custom event.

Trap the custom event in the main form...

Author

Commented:
Thanks Idle_Mind.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial