Click here to Skip to main content
15,919,613 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
wangier22-Oct-03 15:44
wangier22-Oct-03 15:44 
GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
wangier21-Oct-03 17:24
wangier21-Oct-03 17:24 
QuestionHow can I capture the screen with cursor? Pin
qiuji20-Oct-03 22:52
qiuji20-Oct-03 22:52 
AnswerRe: How can I capture the screen with cursor? Pin
Heath Stewart21-Oct-03 6:47
protectorHeath Stewart21-Oct-03 6:47 
GeneralControl Button Doubleclick Pin
Mr. Labenche20-Oct-03 21:46
Mr. Labenche20-Oct-03 21:46 
GeneralRe: Control Button Doubleclick Pin
Heath Stewart21-Oct-03 6:51
protectorHeath Stewart21-Oct-03 6:51 
GeneralRe: Control Button Doubleclick Pin
Mr. Labenche21-Oct-03 23:16
Mr. Labenche21-Oct-03 23:16 
GeneralRe: Control Button Doubleclick Pin
Heath Stewart22-Oct-03 2:52
protectorHeath Stewart22-Oct-03 2:52 
You don't fire the DoubleClick event, unless you're doing your own control. If you're deriving from a control with a DoubleClick event (or you duplicated it with the appropriate delegate), call the protected OnDoubleClick). If you are merely listening for the event, you can't fire it (but your application could directly call the event handler if you like).

The Timer will fire the Elapsed as long as Timer.Enabled is set to true. This is covered - with examples - in the docs for the Timer class and its members.

So, like I said in my first post, you make the Click event handler start the timer (set Enabled to true) and in the event handler for DoubleClick you stop the timer (set Enalbed to false). The Elapsed event won't be fired, then. This is common practice with practically every implementation I've seen, including in Windows itself. After all, how do you think Windows can differentiate between a click and a double-click? It uses a timer set to the OS's/user's double-click timeout configurable in the Mouse control panel applet.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Control Button Doubleclick Pin
Mr. Labenche22-Oct-03 3:07
Mr. Labenche22-Oct-03 3:07 
GeneralRe: Control Button Doubleclick Pin
Heath Stewart22-Oct-03 3:18
protectorHeath Stewart22-Oct-03 3:18 
QuestionHow to connect to a Solaris Unix box from .NET using sockets or tcpclient Pin
Buckin20-Oct-03 21:44
Buckin20-Oct-03 21:44 
AnswerRe: How to connect to a Solaris Unix box from .NET using sockets or tcpclient Pin
Heath Stewart21-Oct-03 6:53
protectorHeath Stewart21-Oct-03 6:53 
GeneralHelp in color of Datagrid Pin
erbest20-Oct-03 17:49
erbest20-Oct-03 17:49 
GeneralAdvice Pin
gadgetfbi20-Oct-03 16:17
gadgetfbi20-Oct-03 16:17 
GeneralRe: Advice Pin
Guillermo Rivero20-Oct-03 16:47
Guillermo Rivero20-Oct-03 16:47 
GeneralRe: Advice Pin
Bo Hunter20-Oct-03 18:05
Bo Hunter20-Oct-03 18:05 
GeneralRe: Advice Pin
leppie21-Oct-03 8:59
leppie21-Oct-03 8:59 
GeneralMultilple Monitors Pin
Jeff Monheiser20-Oct-03 9:00
Jeff Monheiser20-Oct-03 9:00 
GeneralRe: Multilple Monitors Pin
igor196020-Oct-03 9:36
igor196020-Oct-03 9:36 
GeneralRe: Multilple Monitors Pin
Heath Stewart20-Oct-03 10:35
protectorHeath Stewart20-Oct-03 10:35 
GeneralRe: Multilple Monitors Pin
leppie21-Oct-03 11:58
leppie21-Oct-03 11:58 
QuestionWhats wrong with this datagrid code? Pin
RB@Emphasys20-Oct-03 8:32
RB@Emphasys20-Oct-03 8:32 
AnswerRe: Whats wrong with this datagrid code? Pin
RB@Emphasys20-Oct-03 8:46
RB@Emphasys20-Oct-03 8:46 
GeneralRe: Whats wrong with this datagrid code? Pin
RB@Emphasys20-Oct-03 8:49
RB@Emphasys20-Oct-03 8:49 
GeneralAsyncCallBack and COM+ Pin
rick close20-Oct-03 8:09
rick close20-Oct-03 8: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.