If pic1.BackgroundImage = Global.images.My.Resources.ima1 Then
pic1.BackgroundImage = Global.images.My.Resources.ima2
End If
IF statement in background image in a Picture box
-
28-06-2023 - |
Question
I have 2 images in my Project's Resources and I want to make an If statement to see if a picture box has one, if that happens, I want to change to another image. I have something like this but it does not work:
If pic1.BackgroundImage Is Global.images.My.Resources.ima1 Then
pic1.BackgroundImage = Global.images.My.Resources.ima2
End If
Am I right? or what else can I do to it to get that?
Solution
OTHER TIPS
If IsNothing(pic.BackgroundImage) Then
pic.BackgroundImage = simple.My.Resources.Resources.Winter
End If
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow