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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing the Main Window via Close button

Status
Not open for further replies.

Wendz

Programmer
Aug 9, 2000
47
PH
I am just wondering why I can't use the close button on the main program to quit the main program unlike using the form on the main program. What I am doing to resolve this problem is I have a menu on the menu bar which has the comamnd quit. If I will be using the close button it has the message of "Cannot Quit Visual FoxPro" Is there any equivalent command like in .windowstate=2 in using close button in main window as .windowclosebutton=quit? THanks a lot for your help....More power to all!.. [sig][/sig]
 
Hello Wendz!
I think the problem is you issue the read events command in your programm. This command stops executing of programm code and starts event processing until you issue clear events.
Execute [COLOR=/blue]ON SHUTDOWN CLEAR EVENTS[/color] before "read events". In this case when you try to quit FoxPro "clear events" will be issue.

Marat
tolgambaev@hotmail.com [sig][/sig]
 
*To add some with marat say:

ON SHUTDOWN CLEAR EVENTS
DO mainmenu.mpr
READ EVENTS

*If the error still occur try to put this command after READ EVENTS.

ON SHUTDOWN &&& Itself without CLEAR EVENTS

*the function of this is to terminate the first ON SHUTDOWN command.
i hope this help.

August [sig][/sig]
 
Thanks for the tips. I think those are the things I have missed to include in my prog. Good Day!

Wendz

edbb@lycos.com [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top