Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Canceling mouse events from a mousedown()
Message
De
22/03/2005 13:29:30
 
 
À
22/03/2005 12:10:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00998164
Message ID:
00998191
Vues:
20
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform