Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top Level Form

Status
Not open for further replies.

foxfire

Programmer
Joined
May 18, 2001
Messages
38
Location
US
I have a simple form that I want to run as a to level form so the FoxPro main screen is not seen. I have the following:

* main program
_screen.visible=.F.
ON SHUTDOWN DO myshutdown
DO FORM form1.scx
READ EVENTS

PROCEDURE myshutdown
CLEAR EVENTS
ON SHUTDOWN

When I run the exe file, it works fine except that there is still an instance of the program in the Windows Task Manager when I exit the form with thisform.release. It does not show in the task bar as running but I cannot rebuild the exe file as it says the file is in use. If I select the name of the exe in the task manager and select end task, it goes away with no problem. Any help would be appreciated.

Thanks
 
When I run the exe file, it works fine except that there is still an instance of the program in the Windows Task Manager when I exit the form with thisform.release. It does not show in the task bar as running but I cannot rebuild the exe file as it says the file is in use. If I select the name of the exe in the task manager and select end task, it goes away with no problem. Any help would be appreciated.

The ON SHUTDOWN routine only deals with the "X" in the corner of your form. If you have an exit command button put this in it:
CLEAR EVENTS
QUIT

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
FoxFire,
The ON SHUTDOWN is called when Windows wants to shut down - not your program, so you aren't really clearing the event handler. Just after your ThisForm.Release add CLEAR EVENTS (or QUIT!), then it'll close out properly.

Rick
 
That was it, thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top