Solved

Close Top Level form

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
In  today’s increasingly digital world, managed service providers (MSPs) fight for their customers’ attention, looking for ways to make them stay and purchase more services. One way to encourage that behavior is to develop a dependable brand of prod…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now