-
July 10th, 2009, 02:38 AM
#1
[RESOLVED] UserControl Events Problem
I have a User control with a label on it. If I raise a user control click event from the label it works fine. If I raise a user control dblclick event from the label it works fine. If I raise both user control events from their respective label events, then I only receive the click event. If I fire off a msgbox from the user control click event and another from the dblclick event then when I double click the label at runtime I get the msgbox for the click event and a quick flash of the msgbox indicating that a second click event was raised.
I assume this is a timing issue, and I have attempted (albeit unsuccessfully) to implement a click count routine in conjunction with a timer control, but even if it had worked it seems like a cludge anyway.
So for the sake of learning, hypothetically what if I needed the ability to have MouseUp, MouseDown, Click and Doubleclick events? Even my Mouse up and mousedown events are superseded by the click event.
Any help would be appreciated.
-
July 10th, 2009, 05:15 AM
#2
Re: UserControl Events Problem
Last edited by HanneSThEGreaT; June 14th, 2010 at 05:42 AM.
-
July 10th, 2009, 07:45 AM
#3
Re: UserControl Events Problem
Thanks for the warm welcome and the fantastic response. The code worked beautifully. There is a slight delay in the event response but IT WORKS, and the delay is a small trade-off for having the ability to utilize both events. Thanks a Million!!!!
-
July 10th, 2009, 07:51 AM
#4
Re: UserControl Events Problem
You're welcome, and good work
Yeah, the delay is actually caused by the GetDoubleClickTime API. Believe it or not, that is actually the time Windows uses to respond to / determine a Double click event. I'm just glad it worked for you
Keep posting on this wonderful site
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|