Running Active Documents

Visual FoxPro Active Documents require Vfp7.exe and Vfp7run.exe, or Vfp7run.exe, Vfp7r.dll, and Vfp7renu.dll (enu denotes the English version) to run. These files must be installed and registered on the computer on which Internet Explorer is installed. When Visual FoxPro is installed, Vfp7.exe is installed in the Visual FoxPro directory, and the remaining files are installed in the Windows\System directory or the \System32 directory, depending on your operating system.

Running Active Documents from the Tools Menu

The Visual FoxPro Tools menu contains a Run Active Document command that you can choose in order to display the Run Active Document dialog box. In this dialog you can specify how an Active Document is run. The following options are available:

Option Description
In Browser (Default) The Active Document is run in Internet Explorer using the Visual FoxPro run time.
Stand Alone The Active Document is run as a stand-alone application with the Visual FoxPro run time.
In Browser (Debugging) The Active Document is run in Internet Explorer using the Visual FoxPro executable (Vfp7.exe). Debugging capabilities, the Command window, and all features of the Visual FoxPro development environment are available.
Stand Alone (Debugging) The Active Document is run as a stand alone application with the Visual FoxPro executable (Vfp7.exe), providing debugging capabilities, the Command window, and all features of the Visual FoxPro development environment.

Choosing this option is identical to issuing DO <Active Doc Name> in the Command window.

You can also run an Active Document by opening the Active Document from the Open File dialog box in Internet Explorer, or by navigating to the Active Document from another Web page with a hyperlink to the Active Document.

The Visual FoxPro Runtime and Active Documents

From Visual FoxPro you can run an Active Document by double-clicking the Active Document icon in the Windows Explorer. You can also run an Active Document from a Visual FoxPro run-time application. The Visual FoxPro run time consists of two files, Vfp7run.exe and Vfp7r.dll. Both must be installed and registered to run Active Documents. You can also use the run time to run other Visual FoxPro distributable files such as compiled Visual FoxPro programs (.fxp files).

Vfp7run.exe, once registered, can be used to run Active Documents (and other Visual FoxPro distributable files) directly from Windows.

Syntax for Vfp7run.exe

VFP7RUN [/|?|/?][/embedding] [/regserver] [/unregserver] [/security] 
   [/s] [/version] [FileName]

Arguments

  • /|?|/?
    Displays the Microsoft Visual FoxPro Runtime About dialog box, from which you can specify or reset security settings, or review System information.
  • /embedding
    Loads Vfp7run.exe as an active document server. In this mode, Vfp7run.exe is registered as a COM server capable of creating a Visual FoxPro Active Document object ("Visual.FoxPro.Application.6"). Without this argument, Vfp7run.exe doesn't act as a COM server.
  • /regserver
    Registers Vfp7run.exe.
  • /unregserver
    Unregisters Vfp7run.exe.
  • /security
    Displays the Application Security Settings dialog box, making it possible for you to specify the security settings for Active Documents and other application (.app) files. For more information, see the next section, "Active Document Security."
  • /s
    Silent. Specifies that an error is generated if Vfp7run.exe is unable to load the Vfp7r.dll run-time component.
  • /version
    Displays Vfp7run.exe and the Vfp7r.dll version information.
  • FileName
    Specifies the Visual FoxPro file to run.

Vfp7run.exe requires that the run time support dynamic link library Vfp7r.dll be installed and registered. To register Vfp7r.dll, run Regsvr32 with the name of the run time:

Regsvr32 Vfp7r.dll

See Also

Menus in Active Documents | Active Document Security | Interoperability and the Internet | Running an Active Document Sample | Active Documents