General information
Category:
Coding, syntax & commands
AddObject adds an object to a container. It also includes the new object in the Controls collection of the container.
CreateObject creates an object and stores a reference to it in a variable/property. It doesn't touch any collection of any container.
When an object is added to the Controls collection of a container, the container becomes "aware" of the object. For example, a label created with AddObject can be visible in the container for which it was created, a label created with CreateObject cannot be made visible because it is not owned by any container.
Vlad
>Can someone tell me the difference between the two and when to use each?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only