Building an Application File from the Project

To create a finished file from your application, you build it into an application file. An application file has an extension of .app. To run the application, users first start Visual FoxPro, then load the .app file.

You can choose to build either an application (.app) or an executable (.exe) file from your project. Users can run an .app file if they already have a copy of Visual FoxPro. Alternatively, you can create an .exe file. The .exe file works in conjunction with two Visual FoxPro dynamic link libraries (Vfp8r.dll and Vfp8renu.dll) that you ship with your application to provide a complete run-time environment for Visual FoxPro. The second file is specific to the region of the world your application targets. For more information, see Distributing Applications.

To build an application

  1. In the Project Manager, choose Build.

  2. In the Build Options dialog box, choose Build Application to build an .app file, or Build Executable to build an .exe file.

  3. Select any other options you need, then choose OK.

    -or-

For example, to build an application called Myapp.app from a project named Myproj.pjx, you can type:

BUILD APP myapp FROM myproj

To create an application called Myapp.exe from a project named Myproj.pjx, you can type:

BUILD EXE myapp FROM myproj

Note   You can also use the Build dialog box to create an Automation server from your Visual FoxPro application. For more information, see Creating Automation Servers in "Adding OLE."

After you've created a finished application file for your project, you and your users can run it.

To run an application as an .app file

  • In Visual FoxPro, choose Do from the Program menu and select the application file.

    -or-

  • In the Command window, type DO and the name of your application file.

    For example, to run an application called MYAPP, type:

    DO myapp.app
    

If you have created an .exe file from your application, users can run it in a variety of ways.

To run an application as an .exe file

  • In Visual FoxPro, choose Do from the Program menu and select the application file, or in the Command window, type DO and the name of your application file.

    For example, to run an .exe file called Myapp.exe, type:

    DO myapp.exe
    

    -or-

  • In Windows, double-click the icon for the .exe file.

See Also

Testing a Project | Referencing Modifiable Files | Compiling an Application | Build Options | BUILD APP | BUILD EXE