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]