Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application exits but process stays alive
Message
De
11/06/2004 13:34:07
 
 
À
10/06/2004 19:59:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00912489
Message ID:
00912809
Vues:
9
I did some more tests. If the form is a top level form, it works fine, whether screen=off or screen = on, its just that if screen = off, the main foxpro window doesn't show. But, if it's not a top level form (which is what was the case when I first posted, and where I was having the problem), then, the application never shows. Actually, if you issue wait windows, or other commands, they execute, and the application starts, and comes up under applications in the task manager, but, it seems, other commands (such as read events, or menuing commands?) cause the application to exit but remain alive as a process. In this case, if you look in task manager, you will see the exe under processes, but not under applications. Other tests of even simpler code confirmed that you are right, vfp is waiting on the read events, it's just that the 'application' is gone, but the process is alive.
Actually, when I originally was having this problem, I didn't even have a form at all, all I had was a call to a simple menu file, and read events, which also didn't work. Once I issued screen=OFF, this program worked as well.

I'm not sure I did a good job of explaining my problem in the original post. Hopefully this is more clear. Thanks again for your help. Actually I had never used top level forms before. So I think I understand these behaviors better now. It seems that issuing screen=off and not having a top level form will cause this behavior.

BTW - this is vfp 7.0, win 2k server. I'm not sure about other environments.



>SCREEN=OFF should have no bearing on the application exitting or not. All that does is hide the VFP main screen. In order for your screen to be seen at all, it must have been set to be a Top Level form, or otherwise you would have seen nothing.
>
>>Fred,
>>
>>I found it!! I was using the foxpro application wizard, it created a config.fpw in my application folder. It had the command SCREEN = OFF.
>>
>>There were some posts that Ed Rauh had replied to years ago where he advised to check for that. I didn't even realize I had this config.fpw in my application folder.
>>
>>SCREEN = OFF = disaster (for me at least)
>>
>>I need to look into what this is designed for, but in the meantime, obviously I need to get rid of it!
>>
>>
>>
>>>Are you sure you're ever getting to your UNLOAD code?
>>>
>>>
>>>>Fred,
>>>>
>>>>I put it in the unload, so the form won't close until I click the close button. Even when I have no clear events whatsover, the application still exits, but the process remains alive
>>>>
>>>>Thanks
>>>>
>>>>This works from within VFP..
>>>>
>>>>>>Help - I know I've done this countless times before.. but.
>>>>>>
>>>>>>I have the simplest program:
>>>>>>
>>>>>>*simpleform.prg
>>>>>>do form simpleform
>>>>>>read events
>>>>>>
>>>>>>compile the exe
>>>>>>from command window
>>>>>>do simpleform.exe - works
>>>>>>the only thing in simpleform, at all, is clear events in the unload.
>>>>>>
>>>>>>** this works fine
>>>>>>but when I run it from the command line, the program exits, but, the process simpleform.exe is still active under processes in task manager (the application is gone)
>>>>>>
>>>>>>I have to kill the process to get rid of it.
>>>>>>
>>>>>>What am I doing wrong?
>>>>>
>>>>>Sounds like you just closed your form so you're stuck at the READ EVENTS line of code. You need to issue a CLEAR EVENTS at wherever it is you are closing your form.
>>>>>
>>>>>It may be as simple as adding the CLEAR EVENTS to your Form.Destroy method.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform