Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual FoxPro
Expertise: Beginner
Oct 6, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Creating an Executable File from a Project

I copied my executable file and the VFP6R.DLL, VFPRENU.DLL, FOXUSER.DBF and FOXUSER.FPT files to my user's PC. When I try to run it, the screen form flashes and the program just quits.

What am I doing wrong?

The problem you are experiencing is not related to the DLLs; it is happening because you need to create an event loop that holds the executable in memory.

VFP has a command called READ EVENTS that creates an event loop for you, and another command called CLEAR EVENTS that ends the event loop. In your main program, execute a READ EVENTS after everything in the application is set up (e.g., menu, mainform, etc.). That will keep the application in memory. Then put a CLEAR EVENTS in the code that quits the application (e.g., in the menu code for File/Exit).

In regard to the DLLs, you should not just copy DLLs to another machine. There are registration issues as well as file dependencies that can cause problems. Use the wizard that ships with VFP called the Setup Wizard, which builds installation programs for you. It knows what DLLs need to be included and even registers them for you.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date