Chapter 1: Controlling the VFP Environment 3
Controlling the VFP
How VFP starts up when no configuration file is found
Including a configuration file in the project
How to determine which configuration file is being used
What exactly does "Default DataSession" mean?
So can I have a "public" Datasession?
How can I ensure SET commands apply to a private data session?
Suppressing auto-open tables
Creating an environment setting class
How do I get rid of the system toolbars?
The system toolbar "Gotcha!"
Can I make use of keyboard macros in VFP?
How can I construct a more complex macro?
What is a "Macro Set"?
What's the difference between a macro and an On Key Label?
How do I create a 'Splash' screen?
How do I run my splash screen?
An alternative to the splash screen
How to wallpaper your desktop
So how can I get the size of the current _Screen area?
Do I really need to create all these bitmaps?
A toolbar 'gotcha!'
Tidying up your development environment
Closing VFP down
What is an On ShutDown procedure?
What triggers an On Shutdown procedure?
What goes into an On Shutdown procedure?
Functions and Procedures
How shall we proceed?
Parameters (an aside)
By reference, by value?
How do I know what was passed?
How should I position my parameters?
How can I return multiple values from a function?
What about using named parameters?
Passing parameters optionally
Date and time functions
Date in words
What date is the second Tuesday in October of 2000?
Setting up a payment schedule
What date is ten business days from today?
Gotcha! Strict date format and parameterized views
Working with numbers
Converting numbers to strings
Gotcha! calculations that involve money
Gotcha! string concatenation
Converting between strings and data
Other useful functions
How do I determine if a tag exists?
How do I determine if a string contains at least one alphabetic
How to convert numbers to words
How to extract a specified item from a list
Is there a simple way of encrypting passwords?
Where do you want to GOTO?
So why all the fuss about OOP anyway?
So, just what does all this OOP jargon mean?
Classes and Objects
Practical object oriented programming (POOP)
When should you define a class?
So how do you go about designing a class?
This all sounds very good but what does it mean in practice?
How do you go about building your classes?
But does all this design stuff really work in practice?
How does the design actually translate into code?
Use the right control for the job
What do we mean by 'basic'?
Gotcha! Programming the logical controls
Combos and Lists
Combo and list box basics
List and ListItem collections
When do the events fire?
How do I bind my combo and list boxes?
A word about lookup tables
How do I disable individual items in a combo or list?
What if I need to display hundreds of items in my combo
Chapter 6: Grids: The Misunderstood Controls159
Grids: The Misunderstood
Gotcha! Grid's valid fires before the valid of the current control
Gotcha! ActiveColumn does not really tell you which is the active
Gotcha! Scrolled event does not fire when cursor keys scroll the
Using tool tip text instead of multiline headers
How do I give my multiselect grid incremental search capability?
How do I add new records to my grid?
How do I handle row level validation in my data entry grid?
How do I delete records in my data entry grid?
Working with Data
Tables in Visual FoxPro
How to open the specific table you want to use
How to get the structure of a table
How to compare the structures of two tables?
How to test for the presence of a field in a table
How to check if a table is being used by another user
What is exactly is a cursor?
Indexes in Visual FoxPro
Types of indexes
How to get information about an index
How to test for the existence of an index tag
Using candidate (and primary) keys
What is a "surrogate key"?
Managing user-entered keys
Using indexes with bound tables
How to index mixed data types when creating a compound key
How to index a buffered table
Working with the database container
Using long table names
Using database containers
How to validate a database container
How to pack a database container
Moving a database container
So when should I use a trigger?
And when should I use a rule?
Must a trigger or rule always refer to a single function?
Data Buffering and
Using data buffering
Where are we coming from?
What do we mean by 'buffering' anyway?
What does all this mean when creating data-bound forms?
So just how do I set up buffering in a form?
So what mode of buffering should I use in my forms?
Changing the buffer mode of a table
IsChanged() - another function that FoxPro forgot?
The role of OldVal() and CurVal()
So how do I actually detect conflicts?
OK then, having detected an update conflict, what can I do about
Conflict resolution sounds fine in theory, how does it work in
When do I need a transaction?
What effect does rollback have on my data?
How does a transaction impact on FoxPro's locking mechanisms?
Can I use multiple transactions simultaneously?
Some things to watch for when using buffering in
Cannot use OLDVAL() to revert a field under table buffering
Gotcha! Row buffering and commands that move the record
Views in Particular, SQL in
Visual FoxPro views
What exactly is a view?
How do I create a view?
When should I use a view instead of a table?
Hang on! What is a parameterized view?
How do I control the contents of a view when it is opened?
What is the best way to index a view?
More on using views
SQL in Visual FoxPro
Constructing SQL queries
How to extend a SQL generated cursor
Which is better for updating tables, SQL or native FoxPro
Initializing the manager
The public interface
Using the INI file manager
A word on creating the selector object
How the selector class is constructed
Using the selector class
How can I manage paths in a form's dataenvironment?
The data path manager class
The path management table
Using the data path manager
How can I manage forms and toolbars in my application?
The managed form class
The managed toolbar class
The form manager class
How can I track and handle errors?
Classifying Visual FoxPro's errors
How can I simplify getting messages to my users?
Using the message handler
Chapter 11: Forms and Other Visual Classes 363
Forms and Other Visual
Developer Productivity Tools
Using the SCX/VCX editor
The table information page
The form information page
The object list page
Construction of the inspection form
Resizing grid columns properly
Renaming columns and their controls appropriately
The Custom Controls page of the grid builder
Adding method code to grid columns
What VCXList does
Share.prg - a class browser add-in
Using the Visual FoxPro debugger
Features of the debugger windows
Configuring the debugger
Useful breakpoint expressions
Writing code for ease of debugging and maintenance
Working with datasessions
How do I share datasessions between forms?
How do I change datasessions?
What is the event sequence when a form is instantiated or
How do I get a reference to a form's parent form?
How do I get a list of all objects on a form?
How can I set focus to the first control in the tab order?
How do I return a value from a modal form?
How can I create a 'global' property for my application?
Windows API Calls
Using the DECLARE command
What happens when building an executable?
How to use the project options to your advantage
How do you use a project’s Debug Info setting?
How do you use a project’s Encrypted setting?
How do you set a custom icon for an executable?
How do you manage files in the Project Manager?
How do you manage Servers from the Project Manager?
How do you set the project’s object description?
How to set the executable version information
What are the advantages of including the Config.fpw in
How can we include non-VFP objects in the project?
How to reduce screen real estate taken by the Project
How to tear off tabs from the Project Manager
What problems exist when opening a database in the
Project dragging and dropping tricks
What happens when dragging from one project to another?
How do I drag objects from a project to a designer?
What happens when dragging from project to program code?
What happens when dragging from a non-VFP application to a
How to take advantage of the project User field
How to go about documenting the project file
How to use ProjectHooks to catch a big fish
How to set up a global ProjectHook for all projects
What happens when a ProjectHook is lost or deleted?
What did Microsoft leave out of the first release of ProjectHooks?
How to access information in the Project and Files object
How to use Project Objects in development
How to build a basic Application Wizard
ProjectHook and Project Object tricks
How to enhance the base projecthook
How to create a useful development projecthook
How to have the projecthook set the current directory and path
How to remove the printer information from VFP reports
How to track what is done within the Project Manager
How to generate automatic backups of metadata
RAS Project Builder
Report Rule #1
How to speed printing with printer fonts
How to reduce/increase white space when printing memo fields
How to use float to your advantage
Other report techniques
How to avoid hard coded printer problems
How to get the label formats to be available
Report Metadata Manipulation
How to leverage reports and datasessions
How to find "Variable not found" errors in a report
How to avoid having a report disable the system menu
How to collate pages from different reports
How to remove printer info in production reports
How to select the paper tray
Other alternatives to the native Report Designer
How to output to other file types
How to generate PDF output