473,324 Members | 2,370 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,324 software developers and data experts.

User Control Events - HELP

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 fire because the click fires the MouseClick
event on the Label rather than the User Control.

Is there a way to have this work by firing the MouseClick event on the User
Control?

Thanks in advance,

Timothy.

Nov 17 '05 #1
2 1680
Hi Timothy,
why don't you just call the method you want to execute in the user control
in the mouse click event of the label i.e. the mouse click on the label and
the mouse click on the form both call the same method?

Mark.

"Timothy V" wrote:
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 fire because the click fires the MouseClick
event on the Label rather than the User Control.

Is there a way to have this work by firing the MouseClick event on the User
Control?

Thanks in advance,

Timothy.

Nov 17 '05 #2
Well, I could :-) But what if i have 50 controls in the user control (i
simplified the example here). I just wanted to know if there is an easy way
:-) Is there?
"Mark R. Dawson" <Ma*********@discussions.microsoft.com> wrote in message
news:D5**********************************@microsof t.com...
Hi Timothy,
why don't you just call the method you want to execute in the user
control
in the mouse click event of the label i.e. the mouse click on the label
and
the mouse click on the form both call the same method?

Mark.

"Timothy V" wrote:
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 fire because the click fires the MouseClick
event on the Label rather than the User Control.

Is there a way to have this work by firing the MouseClick event on the
User
Control?

Thanks in advance,

Timothy.


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
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...
6
by: grist2mill | last post by:
I want to create a standard tool bar that appears on all pages that is a control. The toolbar has a button 'New'. What I wolud like when the user clicks on 'New' depends on the page they are on. I...
0
by: ab_j | last post by:
I have a user control that contains a dropdown which I want to use as a menu on multiple .aspx pages. Basically, all I am trying to do is pass the selected value of the dropdown in the user...
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...
6
by: Art | last post by:
Hi I'm new at this and need some help. I have a "solution" with 2 projects - the main project and a library. The library is simple, it contains a text box that will appear many times in the form...
2
by: Gummy | last post by:
Hello, I have a user control that has radio buttons and a listbox. This user control is repeated several time on my webpage. What I want to do is alert the main page that the radio buttons...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.