Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exit app
Message
De
11/06/1997 19:46:09
 
 
À
11/06/1997 17:57:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00035994
Message ID:
00036009
Vues:
34
>This will sound like an extremely simple question to most of you, but bear with me. I am having trouble shutting down my app. Issuing CLEAR EVENTS from the exit command in the main menu doesn't release my main form. Issuing Clear events from the destroy event of the main form and closing the from by clicking on the x does nothing. I have decided to use the application object that the project wizard creates, and the application object opens the main form. The app starts fine, I just can't get it to close, with the menu or by clicking in the corner. I do not use the Foxpro window for ANYTHING. What am I doing wrong? How should I be going about this. Thanks in advance for your help.
>
>Erik
Here is a sample of main.prg who start my application and close window after the read event is clear.

set talk off
set safety off
set delete on
set classlib to &gcpathexec.libs additive
set status bar off
set date to french
set cpdialog off
oetat=createobject("o_etat")
oetat.remove_toolbar()
do &gcpathexec.menu1.mpr
do maj
do form &gcpathexec.etat1

read event

=ferme_fen()

if file("debug.txt")
set sysmenu to default
set talk on
oetat.show_toolbar
set status bar on
else
quit
endif
****************************************
***************************************
procedure ferme_fen


LOCAL lnForm, lnFormToClose
lnFormToClose = 1
FOR lnForm = 1 TO _screen.FormCount
IF TYPE("_screen.Forms(lnFormToClose)") == "O"
_screen.activeform.release()
ENDIF
ENDFOR
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform