>PROCEDURE object.Valid >DO CASE >CASE m.thisform.ReleaseType=0 && Form internal Valid > >CASE m.thisform.ReleaseType=1 && Form menu or X close > >OTHERWISE && Quit FoxPro > >ENDPROC >* Valid no fire if you release the form with >* form.release or set null to linked var >This is really great. I put this in my TextField control base class Valid() event:
* If we are quitting the form or Visual FoxPro DO CASE * Form internal Valid CASE ThisForm.ReleaseType=0 * Form menu or X close CASE ThisForm.ReleaseType=1 IF This.lCloseNoValid RETURN .F. ENDIF * Quit FoxPro OTHERWISE IF This.lCloseNoValid RETURN .F. ENDIF ENDCASEI also created a property in my TextField control base class named lCloseNoValid.
* No valid when the form is quitting IF NOT DODEFAULT() RETURN ENDIF ...do the rest of the valid hereThanks a lot, that is one great tip.