Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with function keys/keypress event on form
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00688790
Message ID:
00688794
Views:
15
See Re: Objects not updating ControlSource Thread #558218 Message #558227.

>Hi - i am wanting to assign function keys to various code in my form class so that F1 moves to first record F2 to the previous record etc
>I have got this all working except in one instance. I have a case statement in the keypress of my form class and the keypreview property is set .t.
>
>case nKeyCode == -5 && f6 save
>.mSaveChanges()
>
>The problem is this - if I make changes to text in a textbox and leave the cursor in that textbox then press F6 I loose my changes even though my save routine is getting called - I always seem to loose the changes made to the textbox last edited (the one that the cursor is in when I press F6) - but if I use my save button on the form the changes are saved ok - i have "set confirm on" so I think the problem is that the textbox is not losing focus and the valid not getting called etc. I am not sure how to get it working correctly. Any ideas appreciated!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform