Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

double click difficulties

Posted on 2006-10-20
1
Medium Priority
?
203 Views
Last Modified: 2010-04-16
I am unable to capture the double click event on a button that I am using. The buttons do not support double click events. There are two double click problems I am encountering,

 1) If a user double clicks the button and the button processes the button_click code twice and

 2) When the user double clicks, the first click processes the code which opens a new form, and now the second click activates an event on the second form...  

To solve the first problem, you could disable the button when entering the click method, then re-enable it when it is completed, however there are many buttons and many forms, so I am looking for a less tedious solution.

For the second problem,you almost need some sort of delay before opening the next window, because the next window is opened before the user can even perform the second click.

Any suggestions or ideas would be appreciated
0
Comment
Question by:shmitnols
[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
1 Comment
 
LVL 48

Accepted Solution

by:
AlexFM earned 2000 total points
ID: 17779026
This is not answer, just general design considerations.
Looking at most Windows programs we can see that double-click action is always continuation of click action. For example, in Windows Explorer, click selects file, and double-click opens it. In text editor click sets cursor, double-click selects word under cursor. There is no conflict between click and double-click action because two requirements are met:
1) Double-cluick action is always more "strong" than click action.
2) Double-click action always continues click action and doesn't need to cancel anything which is done in click action.

Looking at your requirements, I see that double-click button handler conflicts with click handler which looks more "strong". Possibly UI design should be changed.

If you need to implement this approach in any case, I think it is necessary to wtite custom button control.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

604 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