3

The LA Fox Develoner Newsletter
VFP - Now What? (Con't from page 3)

3. Open up the Tools, Options dialog and set your default directory. I set mine to the root of my development directory. Then, in the GOFOXGO program that is run from COMMANDDO ... in the CONFIG.FPWfile, I run a menu that displays all of the applications I’m currently working on. (You can create your own menu just be creating a single menu option, and then marking the “Append” option so that this menu is added to the existing system menu.)

Each menu option sets the default directory (and any other appropriate settings) for that application.

4. Open up all of the toolbars. (You can use the View, Toolbars menu option, or you can right click in the grey area next to the Standard toolbar to bring up a menu that offers you all of the available toolbars.)

There are eleven, and if you’re running on a 640 x 480 monitor, you’ll have about 2 inches of usuable screen space once you’re done. Less if you feel adventurous and try the Large Icons checkbox in the Toolbar dialog.

5. Check out the samples in the
SAM PLES\CONTROLS directory underneath VFP.

These are ‘way cool’ and will help you out a lot in determining how to do do various things with the various controls.

6. Ignore the sample application, TasTradens, that ships with Visual FoxPro. It’s really cornplex and could be better documented. It’s a great showcase for demonstrating what can be done with Visual FoxPro but there are better tools for learning how to do it.

If you decide you’re not scared to dig into TasTraders, I can only echo Geena Davis: Be afraid. Be very afraid.

7. Copy all of the tables in an existing 2.6 app to a new directory and then open them up and mess with them (i.e. create databases, modify the structure, and so on) in VFP. Let me repeat that: COPY THEM. Put them in a NEW DIRECTORY.
In Visual FoxPro, tables can belong to a database, or they can be “free.” These both have the same structure, and this structure is not compatible with earlier versions of FoxPro. One main difference is that the header is different - it contains an extra 130-some bytes that is used to identify which database a table belongs to (free tables leave this space emtpy.) The table structure in a Visual FoxPro table can be different as well - there are more data types, including NULL, which can’t be read by older versions.

As a result, when you add a 2.x table to a Visual FoxPro database, the table will be converted to 3.0 structure and then be unreadable in FoxPro 2.x (or by other programs that expect a 2.x DBF file structure.)

You can use the COPY TO xxx TYPE FOX2X to create a 2.x DBF from a Visual FoxPro table.

8. If you bought the Professional Edition, install the
Class Browser and use it. A number of developers
keep it up on their VFP work surface along with the
Command Window.

9.Buy extra tools. Instead of trying to invent everything yourself, why not take advantage of the enormous.amount of time that others have put into Visual FoxPro development already, and boost yourself from their shoulders.

By the way, I was only kidding about encapsulation referring to a message on a bottle cap. You knew that, didn’t you?

[Ed. Note: Whil Hentzen is President of Hentzenwerke Corp., and is a strong participant in the Fox- Forum and FoxGang on CompuServe, as well as producing FoxZen, a set of data-centric utilities and “The Ultimate FoxPro Reference”, a free-ware guide to products and services for the FoxPro market. His new book, Programming Visual FoxPro 3.0, has met with high praise from other authors within the FoxPro community. He’s also working on his first fiction book, Will Aliens Ever Forgive Us for Disco? He can be reached on C'Serve at 70651,2270.]
Page 3

3