Hi!
Yes. The form and container objects have methods AddObject and NewObject that you can use to add your own or default objects. There is also RemoveObject method. There is a collection 'Objects' in container or form (available in run-time only) that you can use to work with any form object by index in collection. There is Controls collection - similar to Objects. Number of objects in collection - ControlCount. However, if you have a container on form, only container will be in these collections, so if you want a real number of all objects on the form, you will require to count on objects inside of container, container in container etc. - through all objects containership tree. SSeveral VFP objects could be containers, you can see which of them in the 'Applies To' list of objects in help for method 'AddObject'.
HTH.
>I would like to remove and add objects from/to my form at run time, depending on some settings. Is this possible ?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.