checking image in a picturebox
-
Dear Gents, I have added a image in picturebox say image1.jpg when form s loaded. In a button click I want to check whether image in a picture box is image1.jpg or some other else. Pls help me to achieve this Regards Azeem
-
Dear Gents, I have added a image in picturebox say image1.jpg when form s loaded. In a button click I want to check whether image in a picture box is image1.jpg or some other else. Pls help me to achieve this Regards Azeem
an imagebox has a property 'initailimage' my suggestion would be to put the image1.jpg into this property (and never change it) then compare the imagebox.image to the imagebox.initialimage I vagly rember doing something like this in the past and it did work so...
-
Dear Gents, I have added a image in picturebox say image1.jpg when form s loaded. In a button click I want to check whether image in a picture box is image1.jpg or some other else. Pls help me to achieve this Regards Azeem
If picturebox1.Image = image1 then
do something...
End IfJust replace [image1] with the location of the image you want to check.
How many bytes of text have I typed in my lifetime??? Man, I wish I kept track...
-
Dear Gents, I have added a image in picturebox say image1.jpg when form s loaded. In a button click I want to check whether image in a picture box is image1.jpg or some other else. Pls help me to achieve this Regards Azeem
First, I am assuming you marked the other two answers (which would have worked) as a bad answer. Don't do this if you do not understand what they are saying, it just agravates other forum dwellers. Second, you should be able to store unique picture information in the Tag property (as a string), and then compare the unique values of different images when replacing the image. I would suggest the unique value be the filename of the picture.
Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios Discounted or Free Software for Students: DreamSpark - downloads.channel8.msdn.com MSDN Academic Alliance - www.msdnaa.com
-
First, I am assuming you marked the other two answers (which would have worked) as a bad answer. Don't do this if you do not understand what they are saying, it just agravates other forum dwellers. Second, you should be able to store unique picture information in the Tag property (as a string), and then compare the unique values of different images when replacing the image. I would suggest the unique value be the filename of the picture.
Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios Discounted or Free Software for Students: DreamSpark - downloads.channel8.msdn.com MSDN Academic Alliance - www.msdnaa.com
Thanks a lot. Absolultely corrct. Regards Azeem