Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there any known behavior changes in the Valid Event?

Status
Not open for further replies.

pcwc66

IS-IT--Management
Dec 14, 2001
163
US
I want to know whether there is any behavior changes in the Valid Event from VFP 6 SP5 to VFP 8 SP1 due to fixes or changes. In VFP 6 SP5, I kind of remember if Valid Event of a control is returning 0, the control will lose focus even though it should not according to Help. But in VFP 8 SP1, it won't.


Thank you for any info.
 
Yes, there was a change. You can't call the GotFocus() method of another control from inside a Valid.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Hi Craig,

I'm not aware of this GotFocus() change. Is this undocumented change? I remember that we use to able to SetFocus() in the Valid event but then it was changed in VFP 6 (don't remember exactly which version).


Thank you for your help.
 
AFAIK, you've never been able to change the focus from a valid method.

As far as returning 0, if the control was losing focus, that was a bug (I don't remember that one). Even in 2.x this was working properly, i.e. returning 0 from a valid kept the focus on the control.


-BP (Barbara Peisch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top