all groups > vb.net controls > november 2006 >
You're in the

vb.net controls

group:

determining the image name for a picture box


determining the image name for a picture box Brad Pears
11/2/2006 5:14:26 PM
vb.net controls: Hello all!! I am completely new to vb .net. I have a picturebox with an =
image assigned to it via a project resource file.

If in code I want to check what the image is and do something based on =
that, I thought I could just do something like ... (where "logo_350x300" =
is the actual name)

if picturebox1.image =3D My.Resources.logo_350x300 then =20
do something
endif

I am getting an error with the above code. How do I determine in code =
what the image name is that was assigned to this particular picturebox?

Re: determining the image name for a picture box Brad Pears
11/2/2006 8:20:58 PM
holy crap!!!

thanks for that...
[quoted text, click to view]

Re: determining the image name for a picture box Herfried K. Wagner [MVP]
11/3/2006 12:04:43 AM
"Brad Pears" <donotreply@notreal.com> schrieb:
[quoted text, click to view]

Use 'Is' instead of '='.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
AddThis Social Bookmark Button