Solved

Create a click event for a custom user control

Posted on 2007-03-27
2
191 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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 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