Solved

Close Top Level form

Posted on 2010-11-17
2
792 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

617 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