Click here to Skip to main content
12,690,839 members (31,421 online)
   

C#

 
GeneralRe: Create a button in the context menu for each selected contact. Pin
csharpcomeintome6-Nov-12 22:24
membercsharpcomeintome6-Nov-12 22:24 
GeneralRe: Create a button in the context menu for each selected contact. Pin
csharpcomeintome6-Nov-12 3:40
membercsharpcomeintome6-Nov-12 3:40 
GeneralRe: Create a button in the context menu for each selected contact. Pin
Eddy Vluggen6-Nov-12 3:42
memberEddy Vluggen6-Nov-12 3:42 
GeneralRe: Create a button in the context menu for each selected contact. Pin
csharpcomeintome6-Nov-12 3:46
membercsharpcomeintome6-Nov-12 3:46 
GeneralRe: Create a button in the context menu for each selected contact. Pin
Eddy Vluggen6-Nov-12 4:04
memberEddy Vluggen6-Nov-12 4:04 
QuestionProblem with Excel WorksheetFunction.Growth in c# Pin
Ross R5-Nov-12 0:17
memberRoss R5-Nov-12 0:17 
Questionavoid double click Pin
neeraj@max4-Nov-12 21:06
memberneeraj@max4-Nov-12 21:06 
AnswerRe: avoid double click Pin
OriginalGriff4-Nov-12 21:34
mvpOriginalGriff4-Nov-12 21:34 
The problem is that the button click event is happening almost immediately - so the second "click" is going to the correct place - the control at that position on the "new" panel. And that will generate a click event for the new button because that is exactly what should happen.
If you want to stop it, then
1) Create a class level variable:
private DateTime lastSwap = DateTime.Now;

2) In the Button1 click handler, set it:
lastSwap = DateTime.Now;
And then swap panels.
3) In the Button2 click handler, check it and ignore if too soon:
if (DateTime.Now < lastSwap.AddMilliseconds(500)) return;

You can change the 500 to any value you think reasonable - 500 provides half a second.
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

GeneralRe: avoid double click Pin
neeraj@max4-Nov-12 22:09
memberneeraj@max4-Nov-12 22:09 
GeneralRe: avoid double click Pin
J4amieC4-Nov-12 22:27
memberJ4amieC4-Nov-12 22:27 
GeneralRe: avoid double click Pin
neeraj@max5-Nov-12 0:25
memberneeraj@max5-Nov-12 0:25 
GeneralRe: avoid double click Pin
Pete O'Hanlon5-Nov-12 1:30
protectorPete O'Hanlon5-Nov-12 1:30 
GeneralRe: avoid double click Pin
J4amieC5-Nov-12 2:27
memberJ4amieC5-Nov-12 2:27 
GeneralRe: avoid double click Pin
neeraj@max5-Nov-12 2:43
memberneeraj@max5-Nov-12 2:43 
GeneralRe: avoid double click Pin
J4amieC5-Nov-12 2:52
memberJ4amieC5-Nov-12 2:52 
GeneralRe: avoid double click Pin
neeraj@max5-Nov-12 20:34
memberneeraj@max5-Nov-12 20:34 
GeneralRe: avoid double click Pin
J4amieC5-Nov-12 22:43
memberJ4amieC5-Nov-12 22:43 
GeneralRe: avoid double click Pin
neeraj@max6-Nov-12 1:08
memberneeraj@max6-Nov-12 1:08 
AnswerRe: avoid double click Pin
neeraj@max22-Nov-12 21:02
memberneeraj@max22-Nov-12 21:02 
QuestionHow to call C++ parameterised function from C# using thread Pin
sjs4u4-Nov-12 5:09
membersjs4u4-Nov-12 5:09 
AnswerRe: How to call C++ parameterised function from C# using thread Pin
Richard MacCutchan4-Nov-12 6:14
mvpRichard MacCutchan4-Nov-12 6:14 
AnswerRe: How to call C++ parameterised function from C# using thread Pin
DaveyM694-Nov-12 6:29
mentorDaveyM694-Nov-12 6:29 
QuestionHow to declare events? Pin
Andy_L_J3-Nov-12 21:41
memberAndy_L_J3-Nov-12 21:41 
AnswerRe: How to declare events? Pin
Richard MacCutchan3-Nov-12 22:32
mvpRichard MacCutchan3-Nov-12 22:32 
GeneralRe: How to declare events? Pin
Andy_L_J3-Nov-12 23:09
memberAndy_L_J3-Nov-12 23:09 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.170117.1 | Last Updated 17 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid