Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GotFocus() clicks a command button
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00385357
Message ID:
00385562
Views:
12
Hi Larry.

>> All that to say, is there something that tells me what the previous object was? Something like: <<

Off the top of my head, I would say that you could add a property to your form class called oLastControl. Put this code in the LostFocus() of your control classes to register them with the form as oLastControl:
*** Register with the form that this is was the last active control
IF PEMSTATUS( Thisform, 'oLastControl', 5 )
  Thisform.oLastControl = This
ENDIF	
Then, in your command button you can test for !IsNull( Thisform.oLastControl ) and Thisform.oLastControl.Name = to whatever you are looking for.

You'll have to test this yourself because I didn't, but I think that something similar should do the trick for you.

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform