Click here to Skip to main content
11,584,040 members (44,136 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I have one problem, i have two buttons, and i have two images in resources.. So i set those two images on buttons , bg image.. So i need to check if image on first button is same as image on a second button, is there any way, code?Please wrote me a code of if statemnt if you know..Thanks..
Posted 28-Feb-13 3:59am
Comments
Edo Tzumer at 28-Feb-13 10:05am
   
Namanja, show some code please
Sergey Alexandrovich Kryukov at 28-Feb-13 12:26pm
   
What do you mean by "same"? Same file? Identical by all bits? Same format or not? Or just similar (nearly helpless case, or very difficult)..?
—SA
Collin Jasnoch at 28-Feb-13 15:05pm
   
Your problem statement seems quite odd.

If you have the two images as resources and you are setting those two images on the buttons bg image there seems no need to run a check. What is it you are trying to accomplish by comparing the bg images of the buttons?
Nemanja Petrovic at 28-Feb-13 16:34pm
   
Lets say:
i have three buttons.
first button have bg image a.jpeg
second button have bg image b.jpeg
third button have bg image a.jpeg

On click on second button bg image will change to a.jepg, so i need to check afther click
if (button1.bgimg == button2.bgimg == button3.bgimg)...?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 430
1 Sergey Alexandrovich Kryukov 334
2 Richard Deeming 220
3 Dave Kreskowiak 200
4 virusstorm 194
0 OriginalGriff 1,623
1 Sergey Alexandrovich Kryukov 1,135
2 Abhinav S 701
3 Dave Kreskowiak 627
4 Suvendu Shekhar Giri 568


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100