DynamicFontItalic

What's in the Downloads?

What vast additions to the conveniences and comforts of living might mankind have acquired, if the money spent in wars had been employed in works of public utility;

Benjamin Franklin, 1783

With this edition of the Hacker's Guide, we've accepted that the Internet is for real and included fewer items in the downloads than in previous versions. Our thinking is that most of you don't want to download a ton of stuff you're never going to use in order to get the one or two items you do want. Instead, in the "Resource File" section, we've given some idea of what's out there and where to get it. The actual download is left as an exercise to the reader.

Please do note that the example code from this book is copyrighted, so if you use any of it in your applications, you need to properly credit it. (That's as simple as leaving intact the copyright notices.)

It's da Book

From our perspective, the most valuable item available for download is the book itself. While that was certainly true for the VFP 6 edition, it's ever so much more so now. In the VFP 7 edition of the book, we've chosen not to kill trees to print what we estimate would be about 1,000 pages of the Reference section. It's available only as part of the HTML Help version of the book. (For more information on working with that version, see "How to Use This Help File" in "Front of the Book.")

At various places in this book, we've mentioned a routine or a form being in the downloads. These items are divided into two categories: demos and utilities. On the whole the utilities are built better than the demos, since they are made to work in real-life conditions. The demos are more fragile and less robust, usually built just to demonstrate a particular code fragment.

Demo Code

For the most part, these are samples provided to make it easier to test a particular class or to understand how something works. If you want to incorporate demo code into an application, you'll probably want to add bulletproofing. Nearly all of these are taken directly out of the book. If there are other examples you want to test out, find that section in the included HTML Help and copy the text into the FoxPro editor.

AscChr.PRG—a form class in code that displays an ASCII chart and lets you set the font. Too slow to use in an application.

Coupon.PRG—run the coupon collector's test for randomness.

DragDropSample.SCX—a form to demonstrate OLE drag and drop.

Dragger.SCX—a form to demonstrate the various native drag-and-drop features of VFP.

Forms.VCX—a form class for demo forms. (Used for DragDropSample.SCX.)

NewFoxCode.DBF—an IntelliSense script. See NewFoxCode.TXT for instructions on installing it.

PeekFKY.PRG—demonstration of reading a macro file with low-level file functions.

RandTest.PRG—run the Chi-Squared test for randomness.

Resize.PRG—a simple demonstration of how a form's contents can be made to sensibly resize.

TestCat.SCX, CallCat.Prg—a form and a program to call it to demonstrate the CatMover class in CoolStuf.VCX. These use ITEMS.DBF and CATEGORY.DBF from the sample database provided with VFP.

TestDate.SCX—a form to demonstrate the DateSpin class in CoolStuf.VCX

TestDraw.SCX—a form to experiment with the interaction of DrawMode, FillStyle and their friends.

TestFont.SCX—a form to let you see the various fonts installed on your system. (Use GetFont() in an app.)

Thrmdemo.SCX—a demonstration of the Thrmomtr class below.

Utility Code

These are routines or classes you can use in your apps.

AColCopy.PRG—copies one or more columns of an array.

AColScan.PRG—searches for an item in a particular column of an array. No longer needed in VFP 7, but handy in older versions.

AIndexes.PRG—fills an array with information about all indexes of a table. Superseded by ATagInfo() in VFP 7 (we like to think we know where they got the idea), but useful for older versions.

AProgram.PRG—fills an array with the program calling chain. Another one you don't need anymore in VFP 7 (where AStackInfo() does this), but may want to use in previous versions.

ARelns.PRG—fills an array with information about all relations in which a table is the parent.

Connect.VCX—a Connection Manager class. See Connect.Txt for details.

CoolStuf.VCX—contains several input tools. See CoolStuf.Txt for details.

DiffDate.PRG—returns the difference in days between two dates.

DispFkey.PRG—displays a list of available function keys.

MakeMArr.PRG—fills an array with the names of all the system menu items.

ParsColr.PRG—lets the user choose a color, and then parses it into red, green and blue. This code uses VFP 7's ability to return an array from a method. For the same functionality in earlier versions, use the RGBComp function in FoxTools.

ParsFont.PRG—lets the user choose a font, and then parses it into name, size and style.

ShowMe.PRG—displays the TYPE() and value of nearly anything in a wait window.

Thrmomtr.VCX—a thermometer control and its component parts. See Thrmomtr.Txt

View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net