Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Articles
Search: 

Hacker's Guide to Visual FoxPro 7.0
Mark McCasland, December 1, 2002
Authors: Tamar Granor, Ted Roche, Doug Hennig and Della Martin Publisher: Hentzenwerke ISBN: 1-930919-22-0 Retail Price: $69.95US for the printed book or $59.95US for the electronic [CHM] file only Publication Date: 2002 Pages: 372 printed, 4.1MB CHM file You also get the electronic ...
Authors: Tamar Granor, Ted Roche, Doug Hennig and Della Martin
Publisher: Hentzenwerke
ISBN: 1-930919-22-0
Retail Price: $69.95US for the printed book or $59.95US for the electronic [CHM] file only
Publication Date: 2002
Pages: 372 printed, 4.1MB CHM file

You also get the electronic file of the entire book when you but the printed version for $69.95US. Section 4, "Visual FoxPro Reference", is only in the electronic, CHM, file.

This is the 3rd edition of what is probably the single most popular book published about Visual FoxPro, and I have all three. The first edition covered version 3 of VFP [HF3] and was published by Addison Wesley. The last 2 have been published by Hentzenwerke. The first book was about 900 pages with a slightly larger page size than the current version. The structure of these books has remained basically unchanged throughout all editions. They all have 5 sections plus the Back o' da Book Section. The second edition of HackFox was enormous. Its pages were regular paper size of 8 1/2' x 11", over 950 pages and weighed a ton. Even though the pages were roughly the same, HF6 was more than twice the size of HF3 because of the page size. The major change with HF7 is that Section 4 is now in electronic format only. Section 4 is the primary reason the book is so popular. This section covers every little PEM, function, command and feature in Visual FoxPro and is the main reason HF6 was so hefty. By moving Section 4 to electronic format [a CHM file], the printed edition of HF7 is down to 372 pages and is the size of other books published by Hentzenwerke. While the sections have remained intact and these sections basically have carried the same material in each addition, each section has also been revised, edited and have had additions.

In the foreword of the book, as in the other editions, they carefully explain what the book is not. Even though they state this is an intermediate level book, I strongly recommend this book to beginners as well because of its overall value for learning what VFP is, how it evolved over the years and especially Section 4. It is not a book for learning how to develop applications in VFP. There are other excellent books from Hentzenwerke better suited for that which can be found in the Back o' de Book section.

Section 1, "Wow, What a Concept", gives a good history of the evolution of the product starting all the way back to the Jet Propulsion Laboratory [JPL] days with Wayne Ratliff and Jeb Long in the mid- to late-1970s then to dBase [Ashton-Tate] and FoxBase [Dave Fulton] in the 1980s. If you ever wondered why there was not a VFP 4, you can find it in this section as well.

One of the topics is devoted to all the gory details about the VFP database, tables, indexes and data types. Have you ever wondered about the structure of VFP table headers? All three editions have had a complete table listing each byte in the header and what information each contains. The next table lists all the bytes that make up each record in the table. Are you nostalgic for what all those old index file extensions were and what product they were associated with? Well, they have a table for that as well.

You also get a table that lists information about every VFP base class including whether or not it is a container, subclassable in the Class Designer, visible and the version of VFP it was introduced. FYI, there were no new base classes introduced in VFP7. The session class was the most recent as it was released in VFP6 SP3. The companion table to this is one that lists all the events and which base classes they are found in along with their meaning.

Section 2, "Ship of Tools", explores all the tools available in VFP. The newest tool introduced in VFP7 is the Object Browser. This tool allows you to open COM objects [like an ActiveX control] and discover its PEMs, interfaces, constants and other details you may need to work with the object. Along with the Class Browser/Component Gallery, these tools are written entirely in VFP. You can find the source code to these tools [VFP6 and later] in the TOOLS\XSOURCE folder in your VFP home. The Object Browser is one of the most useful tools ever provided to VFP developers with respect to automation development. As an example, open the Object Browser in VFP 7 and click the Open Type Library button. The browser will automatically retrieve a list of all registered COM objects. Scroll down to Microsoft Excel 10.0 Object Library and check the box. Scroll down and check the box for Word 10.0 as well and click the OK button. Both objects appear in the Browser list. Expand either one. In the VFP Command Window, type MODI COMM FOO. Now drag the Constants topic from the browser and drop it in the open PRG file. Voila! You now have the constant names and what their values are already in #DEFINE Constant_Name Value format. How cool is that? Of course this section covers all the other tools like the View and Query Designers, Report and Label Designers, Project Manager, etc. One of the more important tools, the debugger, gets extensive coverage. This is all followed by a Q&A of frequently asked questions about these tools.

Section 3, "Franz and Other Lists", is all about lists, do-s and don't-s, hardware issues, operating systems, commands never to use, etc. One of the more interesting is the command to never, ever use. Most of these commands have generally been replaced by newer, better, safer commands. Anyone remember SET DOHISTORY ON? The trace window in the debugger replaces this one. You can still set this in VFP7 although it does not appear in any Intellisense list. The next list of commands are those for development only, and, finally, one that lists commands to be used with caution.

Section 4, "Visual FoxPro Reference",  is the heart and soul of the book. This sections lists every PEM, command, function and system variable in VFP. It is only available in electronic format, is slightly larger than 4MB in size, and must be downloaded from the Hentzenwerke web site. In HF3, this section was a whopping 700 pages long, and 750 pages in HF6. In HF6, this section probably would have eclipsed 1000 pages if printed on the same size paper as the other editions. The CHM file is the electronic version of the entire book.

What you will find for each item in this section [listed alphabetically by its name] is a description of the item. In the case of commands and functions, you will get an explanation of what it is supposed to do [by design] and what it actually does if different from the design. In the case of functions, methods or events, a complete list of parameters if any and their definitions is also described in detail. You also get the correct syntax for usage and sample code if applicable.

Throughout this section, and the book for that matter, they use visual aids to indicate whether something is cool, by design [but is not intuitive but not wrong, etc.], a bug, or a dead bug [a bug in previous versions that has been fixed in VFP7]. Anything new or revised in this section has a red star next to its title.

"But Wait, There's More!" and "The Back o' de Book" wrap up the printed version of the book [and the CHM file as well]. These sections cover features, more details on tools, wizards, builders, ActiveX, and Intellisense. For example, you get a list of the major ActiveX controls, the OCX name, and what controls are in each OCX file. If you ever wanted to develop your own custom builder, there is a topic devoted to builders and how to register your own.

The final section, "Back o' da Book", is a list of resources. These include books, periodicals, on-line resources, people and products that VFP developers may find useful.

In summary, there is a reason why I continue to obtain the current edition of the Hacker's Guide. If I am ever stuck, one of the first resources I turn to is this guide to see if there is an implementation problem, bug or if the particular feature is designed to work [or not work] the way I am trying use it. Hacker's continues to be a must-have reference in my arsenal of VFP tools and books.

More articles from this author
Mark McCasland, January 1, 2001
More and more we are seeing larger companies migrating their databases to Oracle. Usually this is done for data warehousing and for publishing data to the Internet or a company intranet. What I attempt to explain in this FAQ is how to configure a Windows 3.1 or Win95 workstation to access the Oracle...
Mark McCasland, September 1, 1999
Use the following to display the SQL progress bar without having the results [i.e., ### records selected in ### seconds] displayed on the screen or active window.
Mark McCasland, February 6, 2001
If you have a field that is used in multiple tables, you can get a list of all DBC member tables that the field occurs in by executing the following SQL command: select a.objectid, a.parentid, a.objectname fname, b.objectname tname, b.objectid tableid from MyDBC.DBC a join MyDBC.DBC b on a.parent...
Mark McCasland, December 9, 1999
Let's say you need to provide your users the Report Preview or Report Designer toolbars with your application. You need to provide your users with FOXUSER.dbf and .fpt. The only records you need to include in FoxUser are those whose ID = "TTOOLBAR". Assuming you have a folder where you place all ...
Mark McCasland, August 19, 1998
Using the following code to send a beep to the speaker[s]. External speakers and sound card are not required. It makes use of the MessageBeep Windows API function to accomplish it. It accepts a parameter to identify the beep type. Just pass the beep identifier to obtain a different type of beep.
Mark McCasland, April 11, 2003
This demo code will connect to Oracle [using your ID and password] to create a table of Presidents, a trigger, a sequence and some stored procedures. The stored procedures can be called to insert and update data in the Presidents table. Three of the methods in the VFP class will pass data values to...
Mark McCasland, June 4, 2001
One of the fastest ways to load bulk quantities of data into Oracle is to use the Oracle utility, SQL Loader. The purpose of this FAQ is to describe how to get your data into Oracle tables as fast as possible.
Mark McCasland, August 1, 2002
Authors: Harold Chattaway, Randy Pearson & Whil Hentzen Publisher: Hentzenwerke ISBN: 1-930919-07-7 Retail Price: $49.95 US, $74.95 CDN Publication Date: 2002 Pages: 492 Online information: Table of Contents, 8 appendices, Source Code and E-Book URL: http://www.hentzenwerke.com/ ...