#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    11
    Rep Power
    0

    Question Little help with picture box?


    Code:
    private: System::Void pictureBox1_Click(System::Object^  sender, System::EventArgs^  e) {
    			//change icon once picture is clicked.
    			// image 8 = tick
    			//		 9 = cross
    			//		10 = qusetion
    			 
    			 if (pictureBox1->Image->Equals(imageList1->Images[8]))
    			 {
    				 pictureBox1->Image = imageList1->Images[10];
    			 } else if (pictureBox1->Image->Equals(imageList1->Images[10]))
    			 {
    				 pictureBox1->Image = imageList1->Images[9];
    			 } else
    			 {
    				 pictureBox1->Image = imageList1->Images[8];
    			 } 
    		 }
    };
    hey i want to check what image is in the box and then change to a different image depending on the image currently loaded..... any ideas??
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    186
    Rep Power
    82
    The image itself is just an array of bytes that would not be of any help to identify the image. When you first load the image, you should complete the tag property and use that for identifying the image.

IMN logo majestic logo threadwatch logo seochat tools logo