Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SETFOCUS used in KEYPRESS
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00633785
Message ID:
00633792
Views:
15
>I would like to move the focus to an TEXTBOX from a hotkey (F3) - So I trap the F3 in KEYPRESS of my FORM and do THISFORM.SKUFIELD.SETFOCUS() - which gives me a 'Cannot use THISFORM can only be used within a METHOD." error (isn't keypress a method ?1?).
>
>Any thoughts on how to do this easily?

I created a simple form with two textboxes, put your code in the form's Keypress event and ran it. Pressing F3 switches focus to the second textbox w/o any errors. Looks like something else contributes to your error. Maybe you have ON KEY LABEL F3 set?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform