Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Create a click event for a custom user control

Posted on 2007-03-27
2
Medium Priority
?
196 Views
Last Modified: 2013-11-07
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.
0
Comment
Question by:EXTRHMAN
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 18803814
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...
0
 
LVL 1

Author Comment

by:EXTRHMAN
ID: 18808146
Thanks Idle_Mind.
0

Featured Post

Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question