>The name is one of the few properties you can't change. Why would you need to change that one?
Thanks for answering, my stimated Hilmar.
The reason is that I want to change my buttons for an image control class dinamically. In order to do that, I made button invisible, and copy button visible properties (width, height, top, left) to image control. You can see two problems in this approach: 1)When user clicks on the image control it must performs command click method, and 2)When another control reffers to command properties such as Enabled, Visible or so, changes must be applied to image, instead.
I solved the first problem in that way. a)setting Command.Visible = .F. b)storing name of button in an Image control property, c)calling Command.Click from Image.Clik throuhg stored name of commanbutton.
The second problem is the big one. If another control has a "Command1.Enabled = .F." changes must be applied to image, not command. The solution that came to my mind was to assign Command.Name to Image control and change Command.Name. It works partially. I mean, if command is simply on a form or into a container on a form, it really works. But, if command in on a container IN A CLASS, and that class in on a form, doesn't work. So, second problem is still arise.
Can you see now?
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