Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I exit my program?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How do I exit my program?
Divers
Thread ID:
00390511
Message ID:
00390511
Vues:
310
I have a main.prg that has the following code:
*!* open database employee
on shutdown do myshutdown
_screen.windowstate=2
do form renamefile
read event
on shutdown

I have myshutdown.prg that contains the following code:
&& myshutdown
clos all
clea all
capslock(.f.)
clear events
quit

In my form (renamefile) init I am just renaming a file then trying to exit the program:
with thisform
local f,t,continue_on,sour,dest
continue_on = .t.
adir(a__gen2,'d:\test\qlblsrc.fr*')
if type('a__gen2') # 'U' and type('a__gen2') # 'L'
sour=a__gen2(1,1)
conv=stuff(sour,1,8,'')
conv=alltrim(conv)+'.txt'
dest='d:\test\'+conv
sour = 'd:\test\'+sour
rename (sour) to (dest)
endif
endwith
thisform.release()
clear event
return(.t.)


When I run this program in .exe the form renamefile doesn't seem disappear. I need a way to run my code without user intervention. I am doing this right. Can we just run prg file like a batch file? If so how do exit the program without user intervention.

Thanks
Help appreciated
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform