Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with VFP9 and SelectOnEntry
Message
De
08/06/2006 03:43:53
 
 
À
06/06/2006 18:19:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01127505
Message ID:
01127782
Vues:
13
>Kind of a wiggly one but I'm looking for some insight...
>
>Backstory
>I've got some code (I didn't write it and its too involved to post) but its purpose is to allow users to enter text into edit boxes by triggering "hot keys". So they press ALT-Q or whatever and it pastes some text at the insertion point. It's using a timer that reads the keyboard buffer and the like to accomplish this task (why it uses a timer I'm not certain yet...)
>
>The Problem
>When SelectOnEntry is active for these controls, and the user activates the hot key, instead of inserting the text, it replaces all text in the box. Clearly the SelectOnEntry behavior is triggered before the text is inserted.
>
>The Twist
>This code works fine when run in VFP 7 and VFP 8. It insterts the text. Run the same code in VFP 9 and it replaces it.
>
>I know there were some changes made to this feature, I've read here about how you can no longer click to activate SelectOnEntry because some bug was fixed in fox. I can't effectively trace the code (due to the stupid timer mechanism). I can't trap the select on entry event, it doesn't seem to be directly from the When or Got Focus events. Got Focus and Lost Focus never fire during the process. (When does fire but before the selection properties change.)
>
>Any insight is appreciated.

Do bindevent to WM_KEYDOWN messages sent to the form Hwnd, and check the values of lParam and wParam for you key combinations

Carlos
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform