Solved

double click difficulties

Posted on 2006-10-20
1
194 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
1 Comment
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now