It is possible to compare background images of a pictureBox?
This piece of code works?:

pictureBox8.BackgroundImage == pictureBox9.BackgroundImage

I ask bcause apparently, if used as this:

if(pictureBox8.BackgroundImage == pictureBox9.BackgroundImage)

the result of that IF sentence is always false

Edited 6 Years Ago by Arturo32: n/a

For most objects the == operation just compares if they are referencing the same object, it doesn't do a 'deep compare'. You'll have to write your own method that compares the images.

For most objects the == operation just compares if they are referencing the same object, it doesn't do a 'deep compare'. You'll have to write your own method that compares the images.

+1 Momerath, well said. Arturo32, Take a look at Image comparison article.

Thank you Momerath, and thank you too adatapost for that article, you solve my doubt.
Thank you again

This question has already been answered. Start a new discussion instead.