Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stay on the same control when click the button!
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01006656
Message ID:
01006664
Views:
26
>Add a property in the form named oControl
>In When event of the button(s)
>
>IF VARTYPE(thisform.ActiveControl.Name) == "C"
>   thisform.oControl = thisform.ActiveControl
>ENDIF
>
>** In Click Event of the button (or method invoked by it)
>thisform.LockScreen = .t.
>IF VARTYPE(thisform.oControl) == "O"
>   thisform.oControl.SetFocus()
>ENDIF
>thisform.LockScreen = .f.
>
I think this should be added as a FAQ here. Would you do it, please?

Don't forget to set this property to NULL in Form's Destroy, otherwise you would not be able to release the form.

BTW, I would use oLastActiveControl for this property. < g >
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform