Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping Mouse Clicks
Message
De
02/01/2010 11:52:33
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
02/01/2010 10:44:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01441595
Message ID:
01441598
Vues:
59
This message has been marked as a message which has helped to the initial question of the thread.
>In a text box control I need to determine the user action that triggered either When or GotFocus events: was it TAB key, Left Mouse click or Right mouse click? LASTKEY() doesn't return mouse clicks, neither does KeyPress. When and GotFocus events fire before Click or RightClick; MouseDown doesn't fire at all in this scenario, so far as I can determine; and the MouseEnter nButton parameter returns zero, regardless of which mouse button is used.
>
>This seems so simple there must be some solution staring me in the face that I'm too fogged over with New Year's grog to see. Any ideas?

Start some event logging and see which events do happen - then place some code in them to store info about what happened into some properties you set - and don't forget to clean these properties when it loses focus. My bet is that mouseDown does fire, but not exactly when you expect it. Event log should show that.

Though I prefer to use MouseUp - because I have the habit of clicking in wrong places, then dragging away to inactive space, so the mouseUp won't do anything. I.e. it works so in the rest of the Windowses and apps on it, nothing gets triggered by mouseDown (except the look of the button), nothing happens until MouseUp.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform