string as input for a picture

Hello,

I have a problem with using a string as input for a picture.
Here is the situation simplified:

I have two pictures dropped into the project that are called image_new.png and image_old.png
I also have 3 strings:
string_a = “image”
string_b = “_new”
string_c = “_old”

Depending on the situation I need to a Picture(image_new) or Picture(image_old), but these picture names should be build using the string names.

I know it is easier to do when loading the image from disk programmatically, but that is not an option. I need them from the project pre-loaded (dropped).

In short terms, is there any possibility to get this working:
Dim p As Picture = Picture(name As String)

so you need this?

if name = string_b then
return image_new
else
return image_old
end if

[quote=33835:@Christian Schmitz]so you need this?

if name = string_b then
return image_new
else
return image_old
end if[/quote]

No I wish it was that easy, but to keep the example simple I just used two images. In real live the image names are build dynamically for dozens different images.

Set up a dictionary at program launch with the key being your string name and the value being the picture object to which it refers.