Solved

double click difficulties

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 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