Solved

Close Top Level form

Posted on 2010-11-17
2
769 Views
Last Modified: 2012-06-27
I have a form that runs as a top level form.  When the app starts, the main foxpro window is hidden and my form appears and all works well.  I have a prg that is that is the main file for the project.  Before calling the form, I have ON SHUTDOWN DO MyExit.  MyExit is a prg that contains Release All, Clear Events, Quit.  On my form I have an exit button that contains Clear Events.

When clicking the exit button, all works well.  When I click the close button (red x) in the top right corner of the form, the red x now appears disabled and the form does not exit.  I would like the form to close and the application to exit via the red x or the exit button.  What am I missing?
0
Comment
Question by:wcsoctu
2 Comments
 
LVL 14

Accepted Solution

by:
tusharkanvinde earned 500 total points
ID: 34157788
On clicking the red x button, the OnQueryUnload event will be run. You can put your code in it.
0
 
LVL 4

Author Comment

by:wcsoctu
ID: 34157818
The form has the property QueryUnload.  I put CLEAR EVENTS in there and I get exactly what I wanted.  Thank You.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question