Solved

double click difficulties

Posted on 2006-10-20
1
199 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 500 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

Independent Software Vendors: 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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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