>I see it should be done at design time. I will have to change all my forms and controls that reffers to commands properties. What if a control, p.e. a checkbox, has something like this:
Thisform.Command1.Visible = This.Value
??. I will have to change this code, won't I?. It is desirable just to add the image class at runtime without making any changes to the existing code
Sorry, I think that in my previous reply, I misunderstood your example.
Of course you will have to change it, if you want the CommandButton to appear in different places. But it is better to have the possibility to use a variable location. Even if you could change an object's name (which you can't, AFAIK), what about containership? I mean, the object can appear in different places. I guess that if an object is within a Container, added from a class, you want to keep it there!
So yes, you will have to change some code to change from an object with a fixed name, to an object whose name - and containership hierarchy - might change. It should be relatively fast to do these changes, with search and replace.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)