Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Force the grid to lost focus
Message
From
22/01/2003 11:57:06
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
22/01/2003 11:54:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00744309
Message ID:
00744313
Views:
10
>Hi...., I tried to put the setfocus to other object (object outside the grid) while the cursor still focus on the grid. However, the grid still have the focus after the setfocus command. My intention of doing this is make the cursor jump out from the grid when it come to last line (last row) by pressing arrow key down instead of pressing the ctrl + tab.
>
>Perhaps I should code the program to run a command to simulate the ctrl + tab
>automatically. does anybody know the command? Please advise me. Thanks

SetFocus() should work, although it can't be called from certain events, like Valid() and When().

You can simulate a keystroke with the KEYBOARD command. I think in this case it would be:
KEYBOARD "{Ctrl+TAB}"
Although I am not sure VFP recognizes this particular combination.

Of course, you can also simulate other keys, for instance a hotkey like Alt-A, to go to a specific object.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform