Sergey's blog

How to check if variable is Integer

FoxPro doesn't provide a direct way to check if variable is integer or how many digits it has after decimal point but it can be accomplished using PADL() function.

Copy PRG contents to Clipboard

In VFP 9.0 PRG contents will be copied to clipboard in RTF format as well, if there's no 'X' in the _Vfp.EditorOptions.

The code uses Editor functions from Foxtools.fll. See George Tasker's Extended Foxtools Help Download #9333 on UT for more info.



File operations with Progressbar

It's based on the late Ed Rauh's code around SHFileOperation Win API and requires his Heap allocation class. It supports wild cards and shows standard Windows progress bar.


* Copy file to different name
llSuccess = FileOpWithProgressbar("H:\TEMP\tord.dbf", "H:\TMP\TEST.dbf", "Copy")
* Copy with the same name
llSuccess = FileOpWithProgressbar("H:\TEMP\tord.dbf", "H:\TMP\", "Copy")
* Copy all dbf's

VFP 9.0 Report Writer

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 limitations on file and path name

The limitations have been pulled from Windows SDK header file


* Maximum length of full pathname
#define MAX_PATH 260
* Maximum length of path component
#define MAX_DIR 256
* Maximum length of file name component
#define MAX_FNAME 256
* Maximum length of extension component
#define MAX_EXT 256

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

Most of the code was borrowed from Heap allocation class (clsheap) by late Ed Rauh.

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

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.


Subscribe to RSS - Sergey's blog
_REPORT* system variables
File System Variable Notes