Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing a Top-Level form application
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00214962
Message ID:
00215526
Views:
28
>Ed,
>I just tried that and the VFP screen is there: trying to close it gets the "Cannot quit Visual FoxPro" message. What can be done at that point? I've already issued CLEAR EVENTS, QUIT, etc...

The most common cause is a still active READ EVENTS, or an ON SHUTDOWN active somewhere; if you've issued a READ EVENTS more than once, it might be possible that there's still a READ EVENTS active. You might try (this is a SWAG, so it's not based on experience with this problem)

* be certain that the main FoxPro Window is active so you can
* watch what happens...
ON SHUTDOWN
CLEAR EVENTS
CLOSE DATABASES ALL
CLOSE ALL
CLEAR ALL
FLUSH
DECLARE ExitProcess IN WIN32API INTEGER uExitCode
=ExitProcess(0)
QUIT

>Thanks!
>Mark
>
>>>I do that as well....
>>>
>>
>>All I can think of is that you're popping a dialog box somewhere after you've shut down the Top-Level form; since it has no window context to display a message box (no top-level form, and the VFP main screen is running hidden) you could be hanging waiting on a response from the user. Try the following as a debugging effort to see if something is happening:
>>
>>in your code that unloads the top-level form:
>>
>>_Screen.WindowState = 1 && Minimized, appears only on the taskbar
>>_Screen.visible = .T. && but there's a Windows context for messages now
>>
>>>>>Hello, All!
>>>>>I have an EXE that calls one Top-level form. Config.fpw sets SCREEN=OFF. I have CLEAR EVENTS in the Unload event, and the application seems to exit fine, except that I noticed that the task manager (CTRL+ALT+DELETE) shows the app still in memory!
>>>>>What do I do to release everything?
>>>>
>>>>QUIT
>>>>
>>>>>Thanks in advance!
>>>>>Mark
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform