Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with keypres and focus
Message
From
19/09/2003 16:24:10
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem with keypres and focus
Miscellaneous
Thread ID:
00830770
Message ID:
00830770
Views:
63
Hi everyones,

In the Keypress event of a form (form's base class actually) I have this piece of code:

DO CASE
CASE LASTKEY() = 19 AND nShiftAltCtrl = 2 && Ctrl+S
ThisForm.CmdSave.setfocus()
ThisForm.CmdSave.click()


In CmdSave.click() I do some processing and I do TxtBoxA.setfocus()

When I click with the mouse, to focus goes to TxtBoxA.
When I use Ctrl+S the process fire, TxtBoxA get the focus and then it loose it, the focus goes back to the form's grid

When I try to debug, using "set step on", I see the focus goes to TxtBoxA, nothing else is done, and the focus stay there. As soon as I remove the"set step on" command, the focus doesn't stay where it should.

Any ideas?
Diane Robitaille eng.
Next
Reply
Map
View

Click here to load this message in the networking platform