The image item is a different class from PB symbols. So you can do this:
Image1.BackColor = RGB(255, 0, 0)
Where Image1 is the name of the Image item . My example will set it to Red.
May be I give more information what I wanted.
I had done a program to change rectangle colour(red, green,yellow) depend on the pi tag's value. In the coding, I used symbols with dynmic control (item name A1, A2..... input to the funcation, one function can control all item(rectangle fill with colour))
But now, our designer want to change using Picutre replace rectangle. Any help on coding where I want change the picture link on the "Microsoft Forms 2.0 Image's control" or Garphic? Symbols seem not work.
I want as below:
Write a function : Function change_pic(string item)
result: image of A1 will display pic1
result : image of C1 will display pic3
Any one can help me? I don't want one pic with their own coding.
It seems that the PB display doesn't expose these specific form controls as a collection so there is no equivalent of Symbols in that case. What you could do is perhaps an IF statement like
Sub change_pic(container As String, picture As String)
If container = "Image1" Then
Image1.picture = LoadPicture(picture)
you can then call this like
change_pic "Image1", "C:\Users\eugene\Desktop\test.bmp"
Does Eugene's last answer enable you to do what your designer asked for?
Thanks Eugene and Gregor for reply.
I have passed the answer to our designer. In the past few weeks we have concentrated on
business logic issues and pending in working on interface. Sorry for that.
I have marked Eugene's reply as correct answer. This question can also be closed. Thanks a lot!