Environment versions
Network:
Windows 2003 Server
>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only