Hi John,
I think what you have wrong here is running Login from frmMain.Activate. Why not run Login standalone and, depending on the value returned, run frmMain?
DO FORM frmLogin TO lOK
IF lOK
DO frmMain
ENDIF
>Hi,
> I have a top level form called frmmain. When frmMain.ACTIVATE, I will DO FORM frmLogin. frmLogin is a modal form and it will return a value. If the value return is .T., frmLogin will be release. If it is .NULL. the application will be terminate. I face a problem that all of the form were released but the APPLICATION IS NOT TERMINATED PROPERLY, (the command windows is not appear after CLEAR EVENT, need to cancel it manually). The following is my code:
>
>
>main.prg
>
>DO FORM frmMain
>READ EVENT
>
>frmMain.ACTIVATE
>
>IF .NOT. llLogin
> DO FORM frmLogin TO llLogin
> IF .NOT. llLogin
> THIS.RELEASE
> ENDIF
>ENDIF
>
>frmMain.DESTROY
>CLEAR EVENT
>
>
>Anything goes wrong here?
>
>Thank you
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05