Programmatically Manipulate Objects

File: ...\Samples\Vfp98\Solution\Forms\Objects.scx

This sample shows how to set properties at run time for objects in a form set. The sample form set contains two forms. Code associated with the Click event of controls on both forms change the property settings of other controls.

When setting properties of controls at run time, remember to reference the control through its container hierarchy. For example, to set the Value property of a control on one form from code in a method of another form, reference the highest-level container (the form set), and all subsequent containers.

THISFORMSET.frmLeft.chkBold.Value = .F.

For a more detailed description of this sample, see Chapter 9, "Creating Forms," in the Programmer's Guide.