I want to offer my users the option to end the application, running.
On my mainform a selectionform is activated with a selection combobox.
When users click the Quit button, the QueryUnload is activated with following code:
CODE --> VFP
If Isnull(Thisform.cboZorg.Value) lcMessage = "You have not yet made a selection,"+Chr(10)+Chr(13)+; "without this the programm can not work correctly"+chr(10+chr(13)+"Is that correct?" m.lnAnswer = Messagebox( m.lcMessage , 4+32+0, "Take care" ) && Yes = 6, No = 7 Do Case Case m.lnAnswer = 6 m.llClick = .T. Case m.lnAnswer = 7 Endcase Else m.llRet = .T. Endif Do Case Case m.llRet = .F. And m.llClick = .T. m.llRet = .T. Clear events Case m.llRet = .F. And m.llClick = .F. Nodefault m.llRet = .F. Endcase Return m.llRet
How ever the "Clear Events" gets not activated, the form is closed and the program continues....
How to quit? ( I was always told not to use 'quit' in an application, and to use it only to end a VFP session ) Seems that this is an exception to that rule. Correct?