Solved

Create a click event for a custom user control

Posted on 2007-03-27
2
181 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
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
Comment Utility
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
Comment Utility
Thanks Idle_Mind.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now