473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

User Control Events

Hi,

I am working on Windows Form.

I have a user control, which has an Image(PictureBox) and a label.


Now When i am using it on the form and i have attached an click event on the user control.

When i click on the control the click event works fine, but when i click on the image or label inside the user control, it calls the events of the image and label respectively. But i don't want to call the click event of the image or label, i want to call the event which i written for the usercontrol on the form (not at the usercontrol creation).

How do i do this. ?
Please help.
Oct 19 '10 #1
1 1331
Hi,

It got solved by adding

private void img_Click(object sender, EventArgs e)
{
base.OnClick(e);
}
Oct 19 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Timothy V | last post by:
Hi everyone, I hope you can help me. I have a User Control, which has a Label that covers the entire control. I want to assign a MouseClick event to the User Control, however, the event does not...
1
by: dave | last post by:
This is driving me crazy -- I'm trying to raise an event in a web user control and respond to it in a web page. It's a datagrid in a Web User Control which sits in a template column of another...
1
by: Earl Teigrob | last post by:
PROBLEM: When a user control is loaded into a PlaceHolder control more than once, the events do not fire on the first click of a control on the dynamically loaded user control. In other words, the...
2
by: jw56578 | last post by:
Hi, How would the following be accomplished. I have a parent aspx page, that dynamically loads 3 user controls (through LoadControl) depending on a certain criteria. I want the click of a button...
0
by: Jim Reynolds | last post by:
Hi, Could anyone tell me how I trigger user control events from a web page? Thanks Jim
4
by: thomson | last post by:
Hi all, i do have a user control with 4 buttons, and all the events are firing properly, My problem is that i need to right an event handler in the user control, which gets fired after a...
0
by: Michael Carr | last post by:
I am trying to add a user control to a web form and implement one of the control's events. However, when I add the user control to the form, intellisense doesn't seem to detect it as a control....
1
by: johnson.bj | last post by:
I have a relatively minor problem that has been bugging me for a long time. I have created a user control which consists of a few panels and labels. What I want to do with this user control is to...
0
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have a web user control on my page that consists of a textbox, img button, and calendar. i need to handle all the possible clicks on that user control (month change, day selected, img...
0
by: Just D | last post by:
Could anybody show a quick example of the source code with a simple working User Control? I'd like particularly to learn how to work with the User Control events, how to fire an event catching the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.