Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with VFP9 and SelectOnEntry
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01127505
Message ID:
01127571
Views:
14
Hello Sigfried

I think you could greatly simplify your code by doing your hot key magic inside the interactivechange event or keypress event. Doing this you could eliminate the timer completely and make the code easier to follow.

Bob

>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.
'If the people lead, the leaders will follow'
'War does not determine who is RIGHT, just who is LEFT'
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform