I'm not sure if i'm augmenting the wrong message or not understanding how it works or both but .....

i'm trying to augment Verify_Exit_Application and it 'works' in two of three cases

Code:
        Function Verify_Exit_Application Returns Integer
            Integer iRet
    
            If (bSomeContition))) Begin 

                // ask my own question

                If (eResponse = No) Begin
                    Move 1 to iRet
                End     
            End
    
            Function_Return iRet
        End_Function
It works fine if the user clicks the close X and bSomeCondition is false or if the resposnse to my question is Yes .... ie when it returns 0

If they answer No and I return 1 then the application is not exited which is what I want ......

.... however the NEXT time the close X is pressed the VDF Exit Application message box appears BEFORE Verify_Exit_Application is called. If I say Yes to this then Verify_Exit_Application is called and I see my own question again

It's like a flag has been set to say once Verify_Exit_Application has returned 1 then ask the 'internal' exit question for evermore