Could someone please explain why this code work inside VFP and not from a EXE?
This code is from the File|Exit menu to close all open forms before quitting the application. For a reason I can't catch, it will loop indefinitly, refusing to release the form. There's no message and the Release() method is called (I placed a WAIT WINDOW inside the IF to check it).
I'm using VFP 5.0
llExitOK = .T.
DO WHILE llExitOK AND (Type("_Screen.ActiveForm") = "O")
WITH _Screen.ActiveForm
IF .QueryUnload()
.Release()
ELSE
llExitOK = .F.
ENDIF
ENDWITH
ENDDO
TIA