>Is there any way to cancel a mouse event from a mousedown() event so that the subsequent mouseup, click, dblclick, and rightclick events don't fire? NODEFAULT in a mousedown event does not cancel the other mouse events that naturally follow a mousedown event.
>
>My solution has been to add a MouseCanceled property to the control in question that contains the time (seconds()) that a mousedown() event "cancelled" the mouse event, and then have each of the other mouse events check this property to see if they should ignore this particular mouse event (if within 0.4 seconds of the MouseCanceled time).
>
>I'm wondering if there's a more elegant solution like a Windows API call or magic VFP SET/SYS command that will allow me to implement a mouse cancel event without having to scratter properties and logic throughout a control (messy!).
>
>Thanks,
>Malcolm
Malcom, like this ?
thisForm.MouseDownTimeOut = SECONDS()+m.This.MouseDownDelay
IF SECONDS()>m.thisForm.MouseDownTimeOut
NODEF
RETURN
ENDIF
Fabio