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.

Using XmlAdapter to Create and Load Nested XML

topic: 

An XmlAdapter in VFP 9.0 allows to create and load nested XML.

Using Sparse Files sample

Sparse files

are only supported under Windows 2000 and later and the file must be on a volume that is NTFS 5.0 or later.

String comparison in VFP

topic: 

FoxPro has two distinct parts. The SQL Data Engine that handles SQL command: SELECT, INSERT, UPDATE and DELETE and the rest that handles procedural code. There are differences in string comparison between them. The SET ANSI command controls comparison in the SQL Data Engine and the SET EXACT does the same in the procedural code.

Shallow Copy of an Object

topic: 

The function below returns a shallow copy of an object based on the Empty

class. Such an object can be created by SCATTER NAME or CREATEOBJECT("Empty"). A shallow copy means that any properties that hold references to other objects will be copied verbatim and as a result will be pointing to the same child objects. In other words, a shallow copy occurs when an object is copied but its contained objects are not.

Setting the Backup and Restore Privileges

topic: 

The backup and restore privileges are required of all backup and restore applications. These privileges can be programmatically set, and the following example can be used to set these privileges. Based on Setting the Backup and Restore Privileges

RTF Control with inline shortcut menu

The code below shows how to implement a shortcut menu in RTF control when user types '#' character into control. It uses code from Windows API support class and Pixels and Foxels

.

Retrieving Windows system error message

The WIN API FormatMessage function (among other things) can retrieve message definition from an already-loaded module or the system's message table. The error code usually is provided by the GetLastError

WIN API function.

Pages