How to prevent ‘Cannot Quit Visual FoxPro Error?

Asked By 1000 points N/A Posted on -
qa-featured

Hello to all,

I had a problem with my inventory application build from foxpro, whenever I quit the application an error message will pop up on the screen, the error message goes "Cannot Quit  Visual Fox Pro".

Visual Fox Pro

Cannot Quit  Visual Fox Pro

This sounds  great, it seems the applications want to run for 24/7, this error message is so annoying, since I need to go to the task manager to end the task the application for it to quit, I looked for some solution over the internet, but I got nothing at all,

I am now asking for some kind heart to share their talents on my problem,

Thanks a lot.

SHARE
Best Answer by Whudson Audrey
Answered By 0 points N/A #123236

How to prevent ‘Cannot Quit Visual FoxPro Error?

qa-featured

Visual FoxPro Quit error message

The quit error message showed up when still having activity inside the IDE or Integrated Development Environment of the Visual FoxPro. The problem is not how to fix the error but on how to prevent the error message.

Sometimes in our Visual FoxPro applications or codes we commanded some loops that we do not ended in our program code. Once you have a pending or running events or module inside your program codes or compiled applications, you cannot exit or close the IDE or the Visual FoxPro application.

Closing the applications with the X button will do the same. Even typing the “QUIT” command on the command window will still prevent you from quitting Visual FoxPro application or development IDE.

Here’s a little tip on how to prevent the “could not quit” error message.  First tip is before you File and Exit the FoxPro IDE, you must close all forms open. Closing forms will clear all events or events loop inside the forms or application. Next is on using the READ EVENTS, do no forget to clear the events if READ EVENTS is not needed anymore.

The command is CLEAR EVENTS. Also avoid the proactive ON SHUTDOWN CLEAR EVENTS. Instead of this command, use the ON SHUTDOWN DO FileExit. You may also try to use the CLEAR EVENTS command on the command window before exiting the Visual FoxPro IDE.

Now, if you have done those tips, you may File and Exit your Visual FoxPro IDE afterwards. You may also escape our shutdown your Visual FoxPro IDE by typing QUIT on the command window.

Best Answer
Best Answer
Answered By 0 points N/A #195973

How to prevent ‘Cannot Quit Visual FoxPro Error?

qa-featured

Hello,

You have to do is execute ON SHUTDOWN CLEAR EVENTS. Now try out managing the app on the VFP development setting. Near the app. Subsequently make an effort to give up Image FoxPro.

This helps make absolutely no change whether you employ the File Depart control, click on the Near box or kind GIVE UP in the Command Eye-port. The end result may be the exact same: absolutely nothing happens.

ABOUT SHUTDOWN control is still ultimately. Rather than final decrees, VFP is simply performing a particular EVENTS, which has no consequence for anyone who is in the development setting in addition to there is no software managing. To prevent this specific, get back on the app, in addition to put another ABOUT SHUTDOWN control.

Now, allow it to be basically ABOUT SHUTDOWNon its own. Put this specific in the cleanup program code, that is, anywhere following your READ EVENTS. The effect will be to cancel an original ABOUT SHUTDOWN. This particular couple of instructions – ABOUT SHUTDOWN OBVIOUS EVENTS in addition to ABOUT SHUTDOWN on its own – include the minimal you should close decrease subtly. Nevertheless, based on the way the app can be organized, you might need to try and do more.

In your unique software, the File Depart control works a great amount of taking care of ahead of it troubles their OBVIOUS EVENTS.

Especially, it iterates through the number of wide open kinds (that can be, the Forms variety throughout _SCREEN), final each kind therefore. The way it can so, it requests the consumer to cope with almost any unsaved edits.

At that point, the consumer could decide to cancel the shutdown, whereby they get out of the regime will abandon the applicable kind wide open in addition to avoid paying off case hook.

The appliance requirements to endure this specific exact same method no matter the way the individual endeavors in order to close decrease. To achieve this, we place these running in a very method, which in turn we telephone File-exit.

The particular Depart control around the File menus calls this process with an easy COMPLETE File-exit. So can the ABOUT SHUTDOWNcontrol. In other words, rather than performing ABOUT SHUTDOWNOBVIOUS EVENTS, we execute ABOUT SHUTDOWNCOMPLETE File-exit.

I hope this will sort out your problem.

Login/Register to Answer

Related Questions