TIP: Click on subject to list as thread! ANSI
echo: delphi
to: FRANK MALCOLM
from: MARTIN MAAT
date: 1997-06-14 00:19:00
subject: OnMouseDown & OnDblclick

Hallo Frank
 FM> I need to have both OnMouseDown and OnDblclick events active for
 FM> one of my components - but they don't seem to want to live
 FM> together. 
I never encountered this problem (I did have exactly the same trouble you had 
sending keystrokes though, if it's any concilation. I just gave up on it. 
Next time I'll start of with WM_COMMAND and wParam=1 like you said) but a 
quick workaround comes to mind. Declare a variable with component scope and 
store the time in it on MouseDown. Just before doing that, compare the 
current time with the time in the variable and invoke DblClick if the 
difference does not exceed the double click time. You may even be able to 
query Windows for the double click time. I would look for GetSystemInfo and 
the like.
Groeten, Martin.
--- FMail/386 1.02
---------------
* Origin: -=[ E-mail: m_maat@knoware.nl .......... ]=- (2:286/420.1)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.