Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. checking image in a picturebox

checking image in a picturebox

Scheduled Pinned Locked Moved Visual Basic
help
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ahamed Azeem
    wrote on last edited by
    #1

    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

    T K T 3 Replies Last reply
    0
    • A Ahamed 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

      T Offline
      T Offline
      Tom Deketelaere
      wrote on last edited by
      #2

      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...

      1 Reply Last reply
      0
      • A Ahamed 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

        K Offline
        K Offline
        Kenny McKee
        wrote on last edited by
        #3

        If picturebox1.Image = image1 then
        do something...
        End If

        Just 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...

        1 Reply Last reply
        0
        • A Ahamed 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

          T Offline
          T Offline
          Thomas Stockwell
          wrote on last edited by
          #4

          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

          A 1 Reply Last reply
          0
          • T Thomas Stockwell

            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

            A Offline
            A Offline
            Ahamed Azeem
            wrote on last edited by
            #5

            Thanks a lot. Absolultely corrct. Regards Azeem

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups