Asked By
louielamst
980 points
N/A
Posted on - 07/30/2011
Hi, I am sharing a system issue on Visual FoxPro. I Â encounter this error every time IÂ quit the said application. I have attached below the screen shot .
Â
Cannot Quit Visual FoxPro
When I encountered this error for the first time, I thought it was just a minor glitz, but the error has persisted. I even tried removing the application and re-installing it again, but it did not  help. Can you help?
Thanks in advance.
Answered By
Henry12
0 points
N/A
#124902
I Cannot Quit Visual FoxPro
Hello,
Scan your computer and look for some virus. Maybe some virus is corrupting the files of Visual FoxPro and creating this error. Try this from normal mode or if, you can, Â do this using safe mode. If that does not resolve the problem, try the following:
There is an event loop or you can say Read event created on its own. And you can't be able to out until you close the loop manually. To shut down the event loops you have to use the command of CLEAR EVENT. To do this go to the menu of exit from file menu and do the clear event. But if anyone tries to exit by clicking on main function you have to use the command ON SHUTDOWN. In this way you can exit from the program and get rid of this error permanently.
Have a Good Day.
Answered By
annief
5 points
N/A
#124904
I Cannot Quit Visual FoxPro
The first thing is that you should close the application that has locked. The least damaging way of doing this is to use Windows Task Manager in windows 2000 and XP – open the task manager by pressing ALT+CTRL+DEL select task manager from the option and then click Application on the task manager dialog
Select the visual foxpro application from the list, then click end task button, click ok
Now close task manager and open your project in foxpro
In the procedure called by the quit option on the file menu
In the click event of the button that closes your main form
When the application shuts down
On SHUTDOWN clear events
Hope this helps
Answered By
John2011
0 points
N/A
#124905
I Cannot Quit Visual FoxPro
Â
You are facing this issue because your program is in an endless loop.
Â
You will have to quit the event loop in order for the program to shut down.
Â
Normally, we use the CLEAR EVENTS command to exit from an event loop. However, this command only works if the user chooses to close the program by clicking on the Exit option in the File menu. In case the user chooses to close the application by clicking on the close button in the title bar of the program window, the CLEAR EVENTS command would not be executed resulting in the event loop to remain active and you will get the ‘Cannot Quit. ’ Pop-up.
Â
In order to get past this issue, use ON SHUTDOWN CLEAR EVENTS command close to the start of your program and before READ EVENTS. Now, when the user clicks on the close button in the title bar of the program window, the ON SHUTDOWN command would cause the program to quit the event loop and hand over control to the code following READ EVENTS.
Â