Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loosing What is Typed In a Field (even different)
Message
From
21/06/2011 18:07:28
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01515194
Message ID:
01515395
Views:
62
>>Hi,
>>
>>It could be that I dont undestand your problem, but for me when I
>>
>>ThisForm.KeyPreview = .T.
>>
>>and in ThisForm.KeyPress:
>>
>>Lparameters nKeyCode, nShiftAltCtrl
>>Do Case
>>Case nKeyCode = -1 &&F2
>>	Thisform.Pageframe1.ActivePage = 1
>>Case nKeyCode = -2 &&F3
>>	Thisform.Pageframe1.ActivePage = 2
>>Case nKeyCode = -3 &&F4
>>	Thisform.Pageframe1.ActivePage = 3
>>Case nKeyCode = -4 &&F5
>>	Thisform.Pageframe1.ActivePage = 4
>>Case nKeyCode = -5 &&F6
>>	Thisform.Pageframe1.ActivePage = 5
>>Case nKeyCode = -6 &&F7
>>	Thisform.Pageframe1.ActivePage = 6
>>Case nKeyCode = -7  &&F8
>>	Thisform.Pageframe1.ActivePage = 7
>>Endcase
>>
>>
>>
>>The form jumps to the pages as requested without the m_mouseJump method you have coded above.
>>
>>Could very well be possible if you change your code to this your problem of loosing your typed values is also solved, although I would recommend to check before you jump to an other page if the already editted value in the text box needs to be saved or not. ( Tablebuffering(), GetnextModified() )

>Interesting... I will check this out.

methinks that your code has too many lines - which HERE might be harmful.
The above case can be written as
if between(nKeyCode,-7,-1)
   Thisform.Pageframe1.ActivePage = abs(nKeyCode)
endif
similar things in your previous code...
In KeyPress-calls brevity before clarity ;-)

regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform