Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 6 and the QUIT command
Message
De
08/12/1998 14:52:14
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP 6 and the QUIT command
Divers
Thread ID:
00165271
Message ID:
00165271
Vues:
59
The QUIT command doesn't work the same in VFP6 as in VFP5
How do I exit apps gracefully using ON SHUTDOWN and QUIT.
If users trial time expired upon login or while running a form
in the system?

Sample of my 'Test' Source:
************************************************************
***---| Main.prg && The startup procedure
*housekeeping/setup not shown here
LOCAL llLoginOkay

***---| These two line are used in the actual application
*ON ESCAPE DO EscTrap
*ON SHUTDOWN goApp.OnShutdown && This issues the QUIT command

***---| Call MainInit in another .prg file
***---| which instantiates goApp excerpts shown below
***---| PUPLIC goApp
***---| goApp = CREATEOBJECT("xxxApp")

DO FORM Login TO llLoginOkay

***---| These line are used in the actual application
*IF llLoginOkay
* goApp.Show
*ENDIF
*RELEASE goApp

************************************************************
***---| Login.Init()
***---| WindowType = 1-Modal
LOCAL llSomething

llSomething = .T.
IF llSomething
DO FORM form1 TO lnStatus

IF lnStatus <= 0
QUIT && Quit should automatically do a safe shutdown
ELSE
***gnVar =
ENDIF
ENDIF
thisform.Text1.SetFocus()

************************************************************
***---| Form1.Unload()
***---| WindowType = 1-Modal

* xxxBASEFORM::Unload() && no code in baseform's unload

RETURN Thisform.RetValue && property default set to -1

***---| Form1.Command1.Click() && The Cancel button
Thisform.RetValue = -1
Thisform.Release()
************************************************************
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform