This is my collection of useful (and/or useless) FoxPro functions and
procedures. These routines were designed to be used in FoxPro 2.6a, though
most of them should work equally well in other versions. Source code is
included, so feel free to take my bugs out and put
yours in <g>.
About Screen
A Windows procedure that displays the familiar "About" screen in your
application. See also "SysInfo.zip"
[screenshot]
Bar Graphs
A collection of the always popular "progress meters", or
"thermometer displays". There are two different Windows styles, and
one DOS style routine included in the zip file, along with basic
instructions on how to incorporate these into your programs.
[screenshot 1]
[screenshot 2]
BMPInfo.zip
This function returns information about a specified Windows bitmap file.
Information consists of: image height, image width, & number of colors.
Convert.zip
A collection of conversion routines that allow you to convert
one data type to another. Consists of:
- Dec2Hex() - Converts decimal to hex
- Hex2Dec() - Converts hex to decimal
- Bin2Dec() - Converts binary to decimal
- Dec2Bin() - Converts decimal to binary
CredCard.zip
A function that uses the standard checksum algorithm to verify that a
Credit Card number meets the basic requirements for a valid card.
Dates.zip
A collection of date calculation routines that allow you to compute
various date values. Consists of:
- NumDays() - Returns the number of days in a month
- YearDays() - Returns the number of days in a year
- FirstDay() - Returns the DoW of the first day of the month
DrvReady.zip
This function allows you to check a disk drive before
attempting to read or write to it, without getting the "System
Error" dialog that would normally appear if the drive
were empty, write-protected, or contained an unformatted
disk. It does this by disabling the Windows error
mechanism, then resetting it on completion. This allows
you to maintain complete control of your environment,
without the OS interrupting your program. This function
requires the use of FoxTools.fll, and therefore
will not work under FP DOS.
Easter.zip
This function computes the date of Easter Sunday for any given year.
I have no idea why anyone would care <g>.
ISBNchk.zip
A function that uses a checksum algorithm to verify an ISBN number.
Num2Word.zip
A function that will return a character string representing the numeric
value that was passed to it. Commonly used for printing checks, etc.
This function is written to return values using the English language,
but it can be easily modified to return values in any language.
Ordinal.zip
This function accepts a numeric input of a "cardinal" number
(i.e. 1, 2, 3, etc.) and it returns the necessary character
string for use as an "ordinal" number (i.e. 1st, 2nd, 3rd, etc.)
StripEoF.zip
This function will strip the "End of File" byte (0x1Ah)
from the end of a file, if such a byte exists. If the file does not
end with an EoF byte, it remains unchanged.
System Information Screens
A Windows procedure that displays a set of four "system information"
screens. These provide your users with a variety of useful information,
such as: DOS version, Windows version, processor type, available memory,
available drive space, free system resources, etc. Requires FoxTools.fll.
See also "About.zip"
[animated screenshot]
ZoomWind.zip
A completely useless routine that I wrote in an attempt to come up with
a truly functional "unfolding dialog box". The stupid thing actually
works, but I never had a need for it in the first place! I just wanted
to see if it could really be done. Perhaps you will find some use for it,
or at least be able to use it as a learning tool to help understand the way
that FoxPro handles its Windows. (This routine is written to be used in FPW)