>Hi Sergey, thanks for your reply. In your example, you know already that the name of your imagecontrol is oImg, but in my case, I do not know it yet.
>
>I was thinking of doing something like addobject(&cImgName,"Image") but this don't work.
>
>Any more help? TIA.
What do you have in lcImgName?
thisform.NewObject(lcImgName, 'Image') should work assuming you have 'img1' in lcImgName variable.
If you now want to manipulate with this new object you may do
with evaluate('thisform.' + lcImgName)
.width =
...
.visible = .t.
endwith
If it's not broken, fix it until it is.
My Blog