Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET FOCUS,ACTIVATE WINDOW not working, why?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00113956
Message ID:
00114095
Views:
25
Gil,

Issuing a SetFocus call in the LostFocus of a control requires that you also issue a NODEFAULT in that LostFocus so that VFP will not do its automatic setfocus after yours. For example in the LostFocus of Text1 I want to put focus on Text3 if the value of Text1 is "A";
* Text1 lostfocus
IF THIS.Value = "A"
   THISFORM.Text3.Setfocus()
   NODEFAULT
ENDIF
As for your activation of the form, it sounds like you want that form to be modal. A non-modal form will run, create itself and then return to the code that called it.

Either that or you want a READ EVENTS right after you call the form. In this case you would need to issue a CLEAR EVENTS to allow the user to exit the application in the appropriate place.
Previous
Reply
Map
View

Click here to load this message in the networking platform