Monday, November 16, 2009

Foxpro Notes 2: Steps to Build Foxpro Application

If you meet problems when building a runnable exe with Visual Foxpro 9.0 (VFP9), here are some guides for you. (It takes some time for me to search through the forum, damn Microsoft!)

  1. Create the main form, eg. "frmmain.scx"

  2. Create a program and set it as main, eg. "prgmain.prg", with following code:
    Line 1: ON SHUTDOWN QUIT
    Line 2: DO FORM "../forms/frmewsmain.scx"
    Line 3: READ EVENTS

  3. Press "Build.." button on "Project Manager" window to create exe

  4. Copy the "config.fpw" from project folder to the exe folder. Change "SCREEN = OFF" to "SCREEN = ON"

  5. Get "vfp9r.dll" and "VFP9RENU.DLL" from "\Program Files\Common Files\Microsoft Shared\VFP" to the exe folder

  6. Place the exe and data properly and you will be able to run the exe


Note: If you create your own menu and find that you cannot compile the program, change the environment variable "_GENMENU" to locate the "genmenu.prg".

No comments:

Post a Comment