Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Quit an Application
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00740696
Message ID:
00769799
Vues:
25
Hi Bill, a few questions and points to help clarify your situation:

1) If you get a program error - file does not exist - then this itself needs to be investigated and understood. It is not in and of itself related to the ON SHUTDOWN command. Its a logic flaw in the program.

2) When this happens however, VFP will try to locate the missing file and hence you get a windows dialog asking you to try and find the file (table). This is a messy state from which you cannot escape. You will need to end-task the app. Always messy.

3) Using the ExitThread() API in the ON SHUTDOWN is not really a good idea because it means that you are not exiting the app cleanly. The ON SHUTDOWN should call a cleanup and exit program which makes sure everything is closed and shut properly.

4) This last confuses me: Why would your project become read only? Are you running a standalone compiled VFP exe or are you running within the VFP IDE? If the message is "File Access Denied" when trying to open your project then its not because the project is read only but because another process has the project open - possibly the crashed instance of VFP. VFP always opens projects in exclusive mode. Remember that a project file is just a normal .DBF file. Can you clarify this last? Exe or app?



>Hi Jos
>I am having a problem "on Shutdown" from certain PC's that install an .exe that I developed. The PC's that are having the trouble appear not to have any version of FP installed. What happens is . . . after ON SHUTDOWN and CLEAR EVENTS and before going back to the desktop, the user gets a "program error" dialog box saying "File does not Exist". When you click "Ignore" it then goes to the desktop. It looks like a MS dialog box because it has the Windows "banner" in upper left hand corner of dialog box.
>I tried the Win32API ExitThread() in the on Shutdown routine and it closed me out to the desktop. Now cannot open the project. When trying to open the project I get "File Access Denied" which means the project file is write protected. Used ATTRIB in DOS and the Read-only attribute isn't set. Any idea how to remove the "Write protection"?
>All help appreciated.
>Bill Wright
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform