VFP 9.0 Report Features in Runtime

In order to deploy VFP 9.0 object-assisted report features in runtime, the REPORT*.APP files have to be distributed with your application and their location stored into _REPORT* system variables. The error 'Variable _REPORTOUTPUT is not found' may be generated if they are not populated properly.

Windows API support class

The class below simplifies use of Windows API function by providing methods to convert data between VFP types and Windows API types/structures

View PDF in VFP Form

MS Web Browser control can be used to display contents of different type of files, including PDF.

VFP implementation of the Cipher encryption

This is a VFP implementation of the Cipher encryption. Cipher50 C source code and the binary is available as separate downloads File #21474 and File #9222 at http://www.levelextreme.com.

Cipher was originally put into the public domain by Tom Rettig Associates in 1991 and has been re-produced by different parties as necessary for newer versions of FoxPro. Obviously, the VFP implementation is much slower than the C library and should be used for short strings, like passwords, only. The code has been tested under VFP 8.0 and VFP 9.0 but should work in previous versions. If it doesn't, feel free to modify it.

Move Form without Titlebar

topic: 

The code below shows how a form without titlebar can be moved with a mouse. It uses ReleaseCapture and SendMessage Windows API functions and based on How to Move a Form that Has No Titlebar or Caption.

Difference between FUNCTION and PROCEDURE statements

Syntactically there is no difference between FUNCTION and PROCEDURE statements in VFP. In other languages, that have both statements, a function can return a value and a procedure cannot. In VFP the difference comes in the way a procedure/function is called. By default VFP passes parameters by value in call to the functions, by reference to the procedures ( DO ...) and only former allows for a return value.

Determine Printer Margins Programmatically

The GetDeviceCaps function can be used to retrieve printer-specific information as demonstrated below.

Detect Multiple Monitors

The GetSystemMetrics WIN API can be used to get the number of monitors. Some other constants related to multi-monitor PC configurations are also included.

Pages