Sorry, Michel ... I probably should've pointed you to Rick's other reference to this kind of stuff on his WebBlog. It's at:
http://west-wind.com/weblog/posts/256.aspxBasically, you'd need to do something like this (I don't know what your controls are that contain the .Image property, so I'm just calling them object here. You can substitute the correct control:
For lnCounter = 1 To lnNumberOfServer
MyObject = (object)this.GetType().GetField(MyImageName+lnCounter.ToString().Trim(), BindingFlags.Instance|BindingFlags.NonPublic).GetValue(this);
MyObject.Image = Image.FromFile(lcStartupDirectory + "..\Images\Green.gif")
Next
~~Bonnie
>>I'm losing track of your posts. You posted a question an hour earlier about images. You answered that question yourself a half hour after that. This post here seems similar to that answering post, yet it was made 15 minutes after it. I guess I'm just getting confused as to whether you've already answered your question.
>>
>>If you're asking about how to execute dynamic code (which, from your other post, I didn't think you needed to do), then check out Rick's white paper on the subject:
>>
>>
http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm>
>No, this one was not resolved. I just can't see with that article and the use of Reflection how to accomplish that dynamic reference I need.