Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble with QUIT
Message
De
22/02/2003 00:59:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00756424
Message ID:
00756507
Vues:
17
Ria

The QUIT in the CHECKVERSION() routine executes the PRGEXIT() function because you have told it to do so in your ON SHUTDOWN statement in the MAIN program.

The PRGEXIT() function then closes various things and issues a CLEAR EVENTS. But you have not shown where your READ EVENTS statement is?

PRGEXIT() will return control back to CHECKVERSION() when it is complete which in turn will return control back to your MAIN program where I suspect you then issue your READ EVENTS.



>Hi,
>
>I have some trouble with my Quit statements.
>
>Main Program:
>
>On Shutdown Do PrgExit
>IF CHECKVERSION()
>IF OpenFile()
> DO form LOGON
>else
> =MESSAGEBOX( "There has been an error trying to prepare the program.", 16 , "Connect and Open Database Error" )
> RETURN
>EndIf
>EndIf
>
>CheckVersion()
>
>m.xmessage = "I am about to update your PC."+CHR(13)+"Shall I proceed?"
>m.xopt=MESSAGEBOX( m.xmessage , 36 , "Upgrade Option" )
>IF m.xopt=6
> DO UpdatePC
>ELSE
> =MESSAGEBOX( "You have chosen not to update your PC. Program will be terminated." , 48 , "Upgrade Aborted" )
> Quit
>ENDIF
>
>
>PrgExit()
>
>CLOSE DATABASES ALL
>CLOSE ALL
>RELEASE ALL
>CLEAR MEMORY
>ON ERROR
>ON SHUTDOWN
>CLEAR EVENTS
>
>But after the checkversion program executes the QUIT command, instead of quiting the application, the prgexit() program is executed and the control returns to the MAIN program.
>
>What am I doing wrong? Thanks.
>
>Ria
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform