Solved

Close Top Level form

Posted on 2010-11-17
2
779 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

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…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 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