Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem about main screen in runtime
Message
From
07/05/1999 07:46:11
 
 
To
07/05/1999 05:05:12
Yurawat Klaimongkol
Creative Software House
Bangkok, Thailand
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00215982
Message ID:
00215989
Views:
25
>I have a problem with Visual Foxpro main screen.
>The main screen doesn't close when I close my application(.exe file).
>The program still remains in memmory.
>

The odds are very good that your program isn't shutting down properly, either as a result of dangling object references, ON SHUTDOWN, etc. I went through exactly this discussion the other day; you might want to make the main VFP window visible but minimized during the shutdown process, so that any error messages have a windows context to display with, allowing you to see what error occurred and possibly suggesting how to handle it.

I'd add the following just before you issue QUIT to shut down the app:

ON SHUTDOWN
CLEAR EVENTS
_screen.WindowState = 1
_screen.Visible = .T. && the VFP main screen is now visible and minimized
CLOSE DATABASE ALL
CLEAR ALL
QUIT

If you use a lot of API calls that might have some memory allocations that aren't freeing at times, the following may help in place of QUIT - I use this routinely in place of QUIT in a number of instances:

DECLARE ExitProcess IN WIN32API INTEGER uExitCode
=ExitProcess(0)

>I don't want to show the main screen in runtime.
>I read Help about _screen but I don't understand how to use _screen
>to control main screen.
>
>Would you please give me some advise?
>
>Thank you very much,
>Yurawat
>kyurawat@chula.c.th
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