Click here to Skip to main content
15,891,473 members
Home / Discussions / C#
   

C#

 
GeneralRe: how can i release objects....... Pin
Luc Pattyn8-Jan-10 13:09
sitebuilderLuc Pattyn8-Jan-10 13:09 
AnswerRe: how can i release objects....... Pin
dojohansen8-Jan-10 0:21
dojohansen8-Jan-10 0:21 
AnswerRe: how can i release objects....... Pin
Adriaan Davel11-Jan-10 20:46
Adriaan Davel11-Jan-10 20:46 
QuestionAccessing Exchange Server Pin
satsumatable7-Jan-10 20:13
satsumatable7-Jan-10 20:13 
Questionbutton click event Pin
anishkannan7-Jan-10 19:33
anishkannan7-Jan-10 19:33 
AnswerRe: button click event Pin
kpeter67-Jan-10 21:12
kpeter67-Jan-10 21:12 
AnswerRe: button click event Pin
OriginalGriff7-Jan-10 22:25
mveOriginalGriff7-Jan-10 22:25 
GeneralRe: button click event Pin
dojohansen8-Jan-10 0:35
dojohansen8-Jan-10 0:35 
I agree with the first part: A double-click is by it's very nature a click and a double-click. So does MS say it is.

I disagree that the best solution is to use a timer though. The correct use of click and double-click events is to use them so that the side-effect of click is always part of the side-effect of double-click, which logically follows from the fact that a doubleclick implies a click. Then there is nothing at all required in the code to handle the two cases - you simply implement the side effects and you're done.

For example, in a great many apps a click selects something, a double-click executes an action of some kind. If I open a file in Explorer by double-clicking it, I first select it, even if I may not think about that.

Having a component like a button do something on a double-click is completely different from the Windows logic and serves only to confuse users and complicate implementation. The standard ways of dealing with this situation are: 1) Add a context menu to the button (and perhaps some visual clue on the button to it's existence), 2) perform a different action if the button is clicked while a key (SHIFT/CTRL/ALT) is pressed, 3) use one button per action. Personally I tend to think alternative 3 is best in the majority of situations, as it's clear and logical and the user needs to do very little work to figure out how to use the program. Alternative 2 is least user-friendly, but works well in some cases. For example, Visual SourceSafe had many commands that could be invoked by buttons, but that took parameters. For example, the "show history" command has options like "labels only". VSS would display the dialog and require another click to accept the dialog before executing the action, but provided a checkbox "only show this dialog when the SHIFT key is down". Ticking the box made VSS execute the command with default parameters by a single click, while SHIFT+click still provides access to the parameters of the command. Since this was done consistently for many commands it amounts to a useful shortcut.

UI is *far* too important in most applications to allow dirty workarounds or laziness in general. It is the end user who should be lazy, not the UI designer. Smile | :)
GeneralRe: button click event Pin
OriginalGriff8-Jan-10 0:41
mveOriginalGriff8-Jan-10 0:41 
GeneralRe: button click event Pin
Luc Pattyn8-Jan-10 2:09
sitebuilderLuc Pattyn8-Jan-10 2:09 
Questionall form problem? [modified] Pin
miss YY7-Jan-10 19:27
miss YY7-Jan-10 19:27 
AnswerRe: all form problem? Pin
OriginalGriff7-Jan-10 22:32
mveOriginalGriff7-Jan-10 22:32 
QuestionHow to get The Url in the browser's address bar by c#(winform) [modified] Pin
SrhLj7-Jan-10 18:24
SrhLj7-Jan-10 18:24 
AnswerRe: How to get IE address by c#(winform) Pin
Dimitri Witkowski7-Jan-10 19:07
Dimitri Witkowski7-Jan-10 19:07 
GeneralRe: How to get IE address by c#(winform) Pin
SrhLj7-Jan-10 20:25
SrhLj7-Jan-10 20:25 
AnswerRe: How to get The Url in the browser's address bar by c#(winform) Pin
SrhLj7-Jan-10 21:49
SrhLj7-Jan-10 21:49 
JokeRe: How to get The Url in the browser's address bar by c#(winform) Pin
dojohansen8-Jan-10 0:37
dojohansen8-Jan-10 0:37 
AnswerRe: How to get The Url in the browser's address bar by c#(winform) Pin
carlecomm10-Jan-10 20:57
carlecomm10-Jan-10 20:57 
QuestionHow do i get the date, burned speed, manufactorer id of cd or dvd that i was burned? Pin
vinlong907-Jan-10 16:10
vinlong907-Jan-10 16:10 
QuestionConsole.Beep(int,int) uses sound card Pin
Lutosław7-Jan-10 12:13
Lutosław7-Jan-10 12:13 
AnswerRe: Console.Beep(int,int) uses sound card Pin
Expert Coming7-Jan-10 12:20
Expert Coming7-Jan-10 12:20 
GeneralRe: Console.Beep(int,int) uses sound card Pin
Lutosław7-Jan-10 12:32
Lutosław7-Jan-10 12:32 
GeneralRe: Console.Beep(int,int) uses sound card Pin
Expert Coming7-Jan-10 12:43
Expert Coming7-Jan-10 12:43 
AnswerRe: Console.Beep(int,int) uses sound card Pin
DaveyM697-Jan-10 13:06
professionalDaveyM697-Jan-10 13:06 
GeneralRe: Console.Beep(int,int) uses sound card Pin
Roger Wright7-Jan-10 17:16
professionalRoger Wright7-Jan-10 17:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.