Adds an object to a Container object at run time.
Syntax
Object.AddObject(cName, cClass [, cOLEClass] [, aInit1, aInit2 ...])
Arguments
cName
Specifies the name used to reference the new object.
cClass
Specifies the class of the object to add.
cOLEClass
Specifies the OLE class of the object to add.
aInit1, aInit2
Specifies parameters passed to the Init event of the new object.
Remarks
Calling the AddObject method triggers the Init event of the object being added. When a form is added to a form set, the Load event occurs before the Init event.
When you use AddObject to add an object to a container, the object's Visible property is set to false (.F.) so you can set the properties of the object without any awkward visual effects as the object's appearance changes.