Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Canceling mouse events from a mousedown()
Message
From
22/03/2005 13:29:30
 
 
To
22/03/2005 12:10:53
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00998164
Message ID:
00998191
Views:
22
>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 ?
* MouseDownDelay = .NULL. for ignore it
* MouseDown
thisForm.MouseDownTimeOut = SECONDS()+m.This.MouseDownDelay 
* MouseUp
IF SECONDS()>m.thisForm.MouseDownTimeOut
  NODEF
  RETURN
ENDIF
Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform