Moving Foundation READs into Visual FoxPro

See Also

In FoxPro 2.6, the foundation READ was used to emulate event-driven programming by providing an event loop and handler. In Visual FoxPro, you can take advantage of the native event loop by converting your foundation READs.

To move a foundation READ into Visual FoxPro

  1. Replace any foundation READ in the main program with a READ EVENTS command. For example, include a READ EVENTS command in a program that runs your main form or form set.

  2. Place a CLEAR EVENTS command in the form, menu, or program event that ends the program. For example, assign a CLEAR EVENTS command to the Exit menu item.

Also, check the settings of the form set WindowType property for your converted screens. In FoxPro 2.6, you coordinated screens through READ and READ MODAL statements. These statements are converted to the WindowType property when you convert your files. For backward compatibility, the property is automatically set to 2 or 3, depending on the READ mode of the original screen. To enable full event model functionality once you’ve converted foundation READs, change the READ compatibility mode of screens, remove extra pages and page frames, and change form methods. For more details, see Overview of READ Compatibility Architecture and Checking Converted FoxPro 2.6 Screens.