>IMO, this cannot work. In order to call the oMyObject.ZOrder(), oMyObject must be created already. But the object may be created after other objects on the form (because it may not be the first in the scx file). So, you cannot use the ZOrder method to change the creation order of the objects. But you can set this order as you like at design time.
>
The only way I've found so far to change the instantiation order of object on the form, is to cut the object we want to be last (in form designer), save, close the form, reopen in form designer, and paste the control back, save, close. Never found anything better than this, and still wonder if this is reliable at all.
Though, from a pure OOP standpoint, order of instantiation shouldn't matter at all.