The following are sample FoxPro procedures derived from my applications. Please feel free to use them. There are, however, no warranties expressed or implied. Enjoy!


fnGETENV v01.00.00
fnGETENV.PRG is a function similar to GETENV(), but retrieves environment variables from the [GetEnv] section of your FOXPRO.INI file.

fnPRINT_RAW v01.00.00
If you tried to print raw output from FoxPro 2.6a for Windows on a Windows XP, you probably experienced a "General Protection Fault". fnPRINT_RAW.PRG is a workaround to this bug. I haven't tested this code on many machines, so it might or might not work in your situation.

Thanks to Andrew Howell of microsoft.public.fox.programmer.exchange for helping me tackle this problem.

To operate this function, you'll need to download the following:

DOT v01.00.07
DOT.PRG is a very simple program. Simulates the FoxPro command window (dot prompt). If all you have is a FoxPro runtime, at least this module will let you execute basic FoxPro commands. To exit DOT, type QUIT [Enter].

FOXRW v01.00.03
FOXRW.PRG is a very simple program, allowing you to create a FoxPro runtime. For more information about creating your own runtime, see the FoxPro information sheet.

GENERIC v01.01.01
GENERIC.PRG will take a *.PRN file (created from Word 95/97 'Generic/Text Only' to file output), and convert it to an ASCII *.MAN file. This MAN file will have proper carriage return/linefeeds and 60 lines/page, suitable for either display or print.

MKDIR v01.01.00
MKDIR.PRG creates multi-level directories via the RUN command.

Note: This procedure is not FoxPro for Macintosh compatible.

PRINTME v01.00.00
PRINTME.EXE is a small Visual FoxPro 6.0 compiled EXE. Copy this file to your C:\WINDOWS\SENDTO folder. When you right-click on a PRN file, you can sendto the file to printme.exe which will prompt you for the desired printer. The file is then copied directly to the printer, 1000 bytes at a time.

Note: This executable requires either Visual FoxPro 6.0 or the Visual FoxPro 6.0 runtime already installed.

I recently enhanced PRINTME.EXE, replacing the GETPRINTER() prompt with a Visual FoxPro top level form. To this form I added a "number of copies" option.

REDUCE v01.00.00
REDUCE.PRG is a simple program I use in my genealogy work. It will scan a given GEDCOM file, removing duplicate consecutive name, birth, and death facts. In effect, combining fact sources. Very handy for cleaning up a GEDCOM file before uploading to rootsweb. When you run it, you are prompted for source and destination GEDCOM files. The source GEDCOM file is read, creating the destination GEDCOM file with fewer duplicate facts.

This program doesn't remove all duplicate facts, just consecutive facts. While most facts are in sorted order, preferred facts will be at the top of the fact list. So it's still possible to have a duplicate preferred fact. At some point, I'll improve this program to include all facts, preferred and otherwise.

Note: This executable requires either Visual FoxPro 6.0 or the Visual FoxPro 6.0 runtime already installed.

SAVE_MEM v01.00.00
SAVE_MEM.PRG will save memory variables, with different prefixes, to the same memory file.

THERM v01.00.00
THERM.PRG is a simple thermometer. Up to 4 levels. Odometer aware. Derived from my thermometer procedure, minus window/font handling code.

VERIFY v01.00.00
VERIFY.PRG is a simple program I use in my genealogy work. It will scan a given GEDCOM file, checking if all html and jpeg hyperlinks found still exist. When you run it, you are prompted for a GEDCOM file. A database file, VERIFY.DBF is created containing two fields: the field HTTP which contains html or jpeg links, and the field FLAG which contains 'V' for verified, 'X' for not found, or ' ' for unsuccessful search.

If you have many unsuccessful search records, DO VERIFY WITH .T. will recheck them again.

Note: This executable requires either Visual FoxPro 6.0 or the Visual FoxPro 6.0 runtime already installed.

Y1900 v01.00.01
Y1900.PRG is a simple Y2K program. It will check all the DBF files in the current directory. Any date field, in the specified date range, will be incremented 1200 months. 01/01/1900, for example, will be incremented to 01/01/2000. Note that Y1900.PRG won't touch dates stored in character fields (C(8)). Also remember to backup your data files before using such a program.

[Return to Top]
[Go to Home Page]

Copyright 2013 Dennis Allen.

This web page was last updated 11/18/15